Skip to content

Commit 7aaf762

Browse files
authored
src 디렉토리에 있는 번역 안 된 마크다운 동기화 (#236)
1 parent 89efa46 commit 7aaf762

File tree

60 files changed

+1468
-6474
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+1468
-6474
lines changed

src/appendix-01-keywords.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ The following keywords currently have the functionality described.
1515

1616
* `as` - perform primitive casting, disambiguate the specific trait containing
1717
an item, or rename items in `use` and `extern crate` statements
18+
* `async` - return a `Future` instead of blocking the current thread
19+
* `await` - suspend execution until the result of a `Future` is ready
1820
* `break` - exit a loop immediately
1921
* `const` - define constant items or constant raw pointers
2022
* `continue` - continue to the next loop iteration
@@ -40,26 +42,28 @@ The following keywords currently have the functionality described.
4042
* `pub` - denote public visibility in struct fields, `impl` blocks, or modules
4143
* `ref` - bind by reference
4244
* `return` - return from function
43-
* `Self` - a type alias for the type implementing a trait
45+
* `Self` - a type alias for the type we are defining or implementing
4446
* `self` - method subject or current module
4547
* `static` - global variable or lifetime lasting the entire program execution
4648
* `struct` - define a structure
4749
* `super` - parent module of the current module
4850
* `trait` - define a trait
4951
* `true` - Boolean true literal
5052
* `type` - define a type alias or associated type
53+
* `union` - define a [union] and is only a keyword when used in a union declaration
5154
* `unsafe` - denote unsafe code, functions, traits, or implementations
5255
* `use` - bring symbols into scope
5356
* `where` - denote clauses that constrain a type
5457
* `while` - loop conditionally based on the result of an expression
5558

59+
[union]: ../reference/items/unions.html
60+
5661
### Keywords Reserved for Future Use
5762

5863
The following keywords do not have any functionality but are reserved by Rust
5964
for potential future use.
6065

6166
* `abstract`
62-
* `async`
6367
* `become`
6468
* `box`
6569
* `do`

src/appendix-02-operators.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ overload that operator is listed.
2424
| `&` | `&type`, `&mut type`, `&'a type`, `&'a mut type` | Borrowed pointer type | |
2525
| `&` | `expr & expr` | Bitwise AND | `BitAnd` |
2626
| `&=` | `var &= expr` | Bitwise AND and assignment | `BitAndAssign` |
27-
| `&&` | `expr && expr` | Logical AND | |
27+
| `&&` | `expr && expr` | Short-circuiting logical AND | |
2828
| `*` | `expr * expr` | Arithmetic multiplication | `Mul` |
2929
| `*=` | `var *= expr` | Arithmetic multiplication and assignment | `MulAssign` |
3030
| `*` | `*expr` | Dereference | |
@@ -36,7 +36,7 @@ overload that operator is listed.
3636
| `-` | `- expr` | Arithmetic negation | `Neg` |
3737
| `-` | `expr - expr` | Arithmetic subtraction | `Sub` |
3838
| `-=` | `var -= expr` | Arithmetic subtraction and assignment | `SubAssign` |
39-
| `->` | `fn(...) -> type`, <code>\|...\| -> type</code> | Function and closure return type | |
39+
| `->` | `fn(...) -> type`, <code>&vert;...&vert; -> type</code> | Function and closure return type | |
4040
| `.` | `expr.ident` | Member access | |
4141
| `..` | `..`, `expr..`, `..expr`, `expr..expr` | Right-exclusive range literal | |
4242
| `..=` | `..=expr`, `expr..=expr` | Right-inclusive range literal | |
@@ -64,10 +64,10 @@ overload that operator is listed.
6464
| `@` | `ident @ pat` | Pattern binding | |
6565
| `^` | `expr ^ expr` | Bitwise exclusive OR | `BitXor` |
6666
| `^=` | `var ^= expr` | Bitwise exclusive OR and assignment | `BitXorAssign` |
67-
| <code>\|</code> | <code>pat \| pat</code> | Pattern alternatives | |
68-
| <code>\|</code> | <code>expr \| expr</code> | Bitwise OR | `BitOr` |
69-
| <code>\|=</code> | <code>var \|= expr</code> | Bitwise OR and assignment | `BitOrAssign` |
70-
| <code>\|\|</code> | <code>expr \|\| expr</code> | Logical OR | |
67+
| <code>&vert;</code> | <code>pat &vert; pat</code> | Pattern alternatives | |
68+
| <code>&vert;</code> | <code>expr &vert; expr</code> | Bitwise OR | `BitOr` |
69+
| <code>&vert;=</code> | <code>var &vert;= expr</code> | Bitwise OR and assignment | `BitOrAssign` |
70+
| <code>&vert;&vert;</code> | <code>expr &vert;&vert; expr</code> | Short-circuiting logical OR | |
7171
| `?` | `expr?` | Error propagation | |
7272

7373
### Non-operator Symbols
@@ -90,7 +90,7 @@ locations.
9090
| `br"..."`, `br#"..."#`, `br##"..."##`, etc. | Raw byte string literal, combination of raw and byte string literal |
9191
| `'...'` | Character literal |
9292
| `b'...'` | ASCII byte literal |
93-
| <code>\|...\| expr</code> | Closure |
93+
| <code>&vert;...&vert; expr</code> | Closure |
9494
| `!` | Always empty bottom type for diverging functions |
9595
| `_` | “Ignored” pattern binding; also used to make integer literals readable |
9696

@@ -153,6 +153,7 @@ macros and specifying attributes on an item.
153153
| `$ident` | Macro substitution |
154154
| `$ident:kind` | Macro capture |
155155
| `$(…)…` | Macro repetition |
156+
| `ident!(...)`, `ident!{...}`, `ident![...]` | Macro invocation |
156157

157158
Table B-7 shows symbols that create comments.
158159

@@ -180,7 +181,6 @@ Table B-8 shows symbols that appear in the context of using tuples.
180181
| `(expr, ...)` | Tuple expression |
181182
| `(type, ...)` | Tuple type |
182183
| `expr(expr, ...)` | Function call expression; also used to initialize tuple `struct`s and tuple `enum` variants |
183-
| `ident!(...)`, `ident!{...}`, `ident![...]` | Macro invocation |
184184
| `expr.0`, `expr.1`, etc. | Tuple indexing |
185185

186186
Table B-9 shows the contexts in which curly braces are used.

src/appendix-03-derivable-traits.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,9 @@ returned from `to_vec` will need to own its instances, so `to_vec` calls
125125
`clone` on each item. Thus, the type stored in the slice must implement `Clone`.
126126

127127
The `Copy` trait allows you to duplicate a value by only copying bits stored on
128-
the stack; no arbitrary code is necessary. See the [“Stack-Only Data: Copy”]
129-
[stack-only-data-copy]<!-- ignore --> section in Chapter 4 for more information
130-
on `Copy`.
128+
the stack; no arbitrary code is necessary. See the [“Stack-Only Data:
129+
Copy”][stack-only-data-copy]<!-- ignore --> section in Chapter 4 for more
130+
information on `Copy`.
131131

132132
The `Copy` trait doesn’t define any methods to prevent programmers from
133133
overloading those methods and violating the assumption that no arbitrary code
@@ -167,9 +167,9 @@ derive `Default`.
167167

168168
The `Default::default` function is commonly used in combination with the struct
169169
update syntax discussed in the [“Creating Instances From Other Instances With
170-
Struct Update Syntax”]
171-
[creating-instances-from-other-instances-with-struct-update-syntax]<!-- ignore
172-
--> section in Chapter 5. You can customize a few fields of a struct and then
170+
Struct Update
171+
Syntax”][creating-instances-from-other-instances-with-struct-update-syntax]<!-- ignore -->
172+
section in Chapter 5. You can customize a few fields of a struct and then
173173
set and use a default value for the rest of the fields by using
174174
`..Default::default()`.
175175

src/appendix-04-useful-development-tools.md

+17-17
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
# Appendix D - Useful Development Tools
1+
## Appendix D - Useful Development Tools
22

33
In this appendix, we talk about some useful development tools that the Rust
44
project provides. We’ll look at automatic formatting, quick ways to apply
55
warning fixes, a linter, and integrating with IDEs.
66

7-
## Automatic Formatting with `rustfmt`
7+
### Automatic Formatting with `rustfmt`
88

99
The `rustfmt` tool reformats your code according to the community code style.
1010
Many collaborative projects use `rustfmt` to prevent arguments about which
1111
style to use when writing Rust: everyone formats their code using the tool.
1212

1313
To install `rustfmt`, enter the following:
1414

15-
```text
15+
```console
1616
$ rustup component add rustfmt
1717
```
1818

1919
This command gives you `rustfmt` and `cargo-fmt`, similar to how Rust gives you
2020
both `rustc` and `cargo`. To format any Cargo project, enter the following:
2121

22-
```text
22+
```console
2323
$ cargo fmt
2424
```
2525

@@ -29,7 +29,7 @@ on `rustfmt`, see [its documentation][rustfmt].
2929

3030
[rustfmt]: https://github.com/rust-lang/rustfmt
3131

32-
## Fix Your Code with `rustfix`
32+
### Fix Your Code with `rustfix`
3333

3434
The rustfix tool is included with Rust installations and can automatically fix
3535
some compiler warnings. If you’ve written code in Rust, you’ve probably seen
@@ -50,7 +50,7 @@ fn main() {
5050
Here, we’re calling the `do_something` function 100 times, but we never use the
5151
variable `i` in the body of the `for` loop. Rust warns us about that:
5252

53-
```text
53+
```console
5454
$ cargo build
5555
Compiling myprogram v0.1.0 (file:///projects/myprogram)
5656
warning: unused variable: `i`
@@ -69,7 +69,7 @@ indicates that we intend for this variable to be unused. We can automatically
6969
apply that suggestion using the `rustfix` tool by running the command `cargo
7070
fix`:
7171

72-
```text
72+
```console
7373
$ cargo fix
7474
Checking myprogram v0.1.0 (file:///projects/myprogram)
7575
Fixing src/main.rs (1 fix)
@@ -96,20 +96,20 @@ The `for` loop variable is now named `_i`, and the warning no longer appears.
9696
You can also use the `cargo fix` command to transition your code between
9797
different Rust editions. Editions are covered in Appendix E.
9898

99-
## More Lints with Clippy
99+
### More Lints with Clippy
100100

101-
The Clippy tool is a collection of lints to analyze your code to catch common
102-
mistakes and improve your Rust code.
101+
The Clippy tool is a collection of lints to analyze your code so you can catch
102+
common mistakes and improve your Rust code.
103103

104104
To install Clippy, enter the following:
105105

106-
```text
106+
```console
107107
$ rustup component add clippy
108108
```
109109

110110
To run Clippy’s lints on any Cargo project, enter the following:
111111

112-
```text
112+
```console
113113
$ cargo clippy
114114
```
115115

@@ -139,9 +139,9 @@ error: approximate value of `f{32, 64}::consts::PI` found. Consider using it dir
139139
= help: for further information visit https://rust-lang-nursery.github.io/rust-clippy/master/index.html#approx_constant
140140
```
141141

142-
This error lets you know that Rust has this constant defined more precisely,
143-
and that your program would be more correct if you used the constant instead.
144-
You would then change your code to use the `PI` constant. The following code
142+
This error lets you know that Rust has this constant defined more precisely and
143+
that your program would be more correct if you used the constant instead. You
144+
would then change your code to use the `PI` constant. The following code
145145
doesn’t result in any errors or warnings from Clippy:
146146

147147
<span class="filename">Filename: src/main.rs</span>
@@ -158,7 +158,7 @@ For more information on Clippy, see [its documentation][clippy].
158158

159159
[clippy]: https://github.com/rust-lang/rust-clippy
160160

161-
## IDE Integration Using the Rust Language Server
161+
### IDE Integration Using the Rust Language Server
162162

163163
To help IDE integration, the Rust project distributes the *Rust Language
164164
Server* (`rls`). This tool speaks the [Language Server
@@ -171,7 +171,7 @@ such as [the Rust plug-in for Visual Studio Code][vscode].
171171

172172
To install the `rls`, enter the following:
173173

174-
```text
174+
```console
175175
$ rustup component add rls
176176
```
177177

src/appendix-05-editions.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# Appendix E - Editions
1+
## Appendix E - Editions
2+
23
In Chapter 1, you saw that `cargo new` adds a bit of metadata to your
34
*Cargo.toml* file about an edition. This appendix talks about what that means!
45

src/appendix-06-translation.md

+7-3
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,17 @@ For resources in languages other than English. Most are still in progress; see
1111
- [Українська](https://github.com/pavloslav/rust-book-uk-ua)
1212
- [Español](https://github.com/thecodix/book), [alternate](https://github.com/ManRR/rust-book-es)
1313
- [Italiano](https://github.com/AgeOfWar/rust-book-it)
14-
- [Русский](https://github.com/ruRust/rust_book_2ed)
14+
- [Русский](https://github.com/rust-lang-ru/book)
1515
- [한국어](https://github.com/rinthel/rust-lang-book-ko)
16-
- [日本語](https://github.com/hazama-yuinyan/book)
17-
- [Français](https://github.com/quadrifoglio/rust-book-fr)
16+
- [日本語](https://github.com/rust-lang-ja/book-ja)
17+
- [Français](https://github.com/Jimskapt/rust-book-fr)
1818
- [Polski](https://github.com/paytchoo/book-pl)
1919
- [עברית](https://github.com/idanmel/rust-book-heb)
2020
- [Cebuano](https://github.com/agentzero1/book)
2121
- [Tagalog](https://github.com/josephace135/book)
2222
- [Esperanto](https://github.com/psychoslave/Rust-libro)
2323
- [ελληνική](https://github.com/TChatzigiannakis/rust-book-greek)
24+
- [Svenska](https://github.com/sebras/book)
25+
- [Farsi](https://github.com/pomokhtari/rust-book-fa)
26+
- [Deutsch](https://github.com/rust-lang-de/rustbook-de)
27+
- [Turkish](https://github.com/RustDili/dokuman/tree/master/ceviriler), [online](https://rustdili.github.io/)

src/appendix-07-nightly-rust.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Appendix G - How Rust is Made and “Nightly Rust”
1+
## Appendix G - How Rust is Made and “Nightly Rust”
22

33
This appendix is about how Rust is made and how that affects you as a Rust
44
developer.
@@ -141,8 +141,8 @@ Rustup makes it easy to change between different release channels of Rust, on a
141141
global or per-project basis. By default, you’ll have stable Rust installed. To
142142
install nightly, for example:
143143

144-
```text
145-
$ rustup install nightly
144+
```console
145+
$ rustup toolchain install nightly
146146
```
147147

148148
You can see all of the *toolchains* (releases of Rust and associated
@@ -162,7 +162,7 @@ nightly on a specific project, because you care about a cutting-edge feature.
162162
To do so, you can use `rustup override` in that project’s directory to set the
163163
nightly toolchain as the one `rustup` should use when you’re in that directory:
164164

165-
```text
165+
```console
166166
$ cd ~/projects/needs-nightly
167167
$ rustup override set nightly
168168
```

0 commit comments

Comments
 (0)