diff --git a/po/ko.po b/po/ko.po index 401a19c6..9477a60f 100644 --- a/po/ko.po +++ b/po/ko.po @@ -9206,6 +9206,29 @@ msgid "" "}\n" "```" msgstr "" +"```rust,editable\n" +"#[derive(Debug)]\n" +"struct Point {\n" +" x: T,\n" +" y: T,\n" +"}\n" +"\n" +"fn main() {\n" +" let integer = Point { x: 5, y: 10 };\n" +" let float = Point { x: 1.0, y: 4.0 };\n" +" println!(\"{integer:?} and {float:?}\");\n" +"}\n" +"```" + +#: src/generics/data-types.md:21 +msgid "" +"* Try declaring a new variable `let p = Point { x: 5, y: 10.0 };`.\n" +"\n" +"* Fix the code to allow points that have elements of different types." +msgstr "" +"* 새 변수 `let p = Point { x: 5, y: 10.0 };`를 선언해 보세요.\n" +"\n" +"* `Point`가 서로 다른 타입의 값들으로 이루어져도 컴파일 되도록 코드를 수정해 보세요." #: src/generics/methods.md:1 msgid "# Generic Methods" @@ -9235,6 +9258,23 @@ msgid "" "}\n" "```" msgstr "" +"```rust,editable\n" +"#[derive(Debug)]\n" +"struct Point(T, T);\n" +"\n" +"impl Point {\n" +" fn x(&self) -> &T {\n" +" &self.0 // + 10\n" +" }\n" +"\n" +" // fn set_x(&mut self, x: T)\n" +"}\n" +"\n" +"fn main() {\n" +" let p = Point(5, 10);\n" +" println!(\"p.x = {}\", p.x());\n" +"}\n" +"```" #: src/generics/methods.md:25 msgid "" @@ -9508,6 +9548,12 @@ msgid "" "}\n" "```" msgstr "" +"```rust,editable\n" +"fn main() {\n" +" let integer = Some(5);\n" +" let float = Some(5.0);\n" +"}\n" +"```" #: src/generics/monomorphization.md:12 msgid "behaves as if you wrote" @@ -9532,6 +9578,22 @@ msgid "" "}\n" "```" msgstr "" +"```rust,editable\n" +"enum Option_i32 {\n" +" Some(i32),\n" +" None,\n" +"}\n" +"\n" +"enum Option_f64 {\n" +" Some(f64),\n" +" None,\n" +"}\n" +"\n" +"fn main() {\n" +" let integer = Option_i32::Some(5);\n" +" let float = Option_f64::Some(5.0);\n" +"}\n" +"```" #: src/generics/monomorphization.md:31 msgid ""