update appendix-01

pull/210/head
Turing Zhu 6 years ago
parent bfb6c70c33
commit fb8479ed1e

@ -2,10 +2,11 @@
> [appendix-01-keywords.md](https://github.com/rust-lang/book/blob/master/second-edition/src/appendix-01-keywords.md) > [appendix-01-keywords.md](https://github.com/rust-lang/book/blob/master/second-edition/src/appendix-01-keywords.md)
> <br> > <br>
> commit 60f22d98fe8ee0ce04824a8536a95f12ba118027 > commit 32215c1d96c9046c0b553a05fa5ec3ede2e125c3
下面的列表中是Rust正在使用或者以后会用关键字。因此这些关键字不能被用作标识符例如 下面的列表中是Rust正在使用或者以后会用关键字。因此这些关键字不能被用作标识符例如
函数名、变量名、参数名、结构体、模块名、crates名、常量名、宏名、静态值的名字。 函数、变量、参数、结构体、模块、crate、常量、宏、静态值、属性、类型、trait 或生命周期
的名字。
### 目前正在使用的关键字 ### 目前正在使用的关键字
@ -39,12 +40,14 @@
* `super` - 表示当前模块的父模块 * `super` - 表示当前模块的父模块
* `trait` - 定义一个 **trait** * `trait` - 定义一个 **trait**
* `true` - 布尔值 `true` * `true` - 布尔值 `true`
* `type` - 定义一个类型别名或相关的类型 * `type` - 定义一个类型别名或相关的类型
* `unsafe` - 表示不安全的代码、函数、**traits** 或者方法实现 * `unsafe` - 表示不安全的代码、函数、**traits** 或者方法实现
* `use` - 引入外部空间的符号 * `use` - 引入外部空间的符号
* `where` - 表示一个类型约束 [\[For example\]](ch13-01-closures.html#使用带有泛型和-fn-trait-的闭包) * `where` - 表示一个类型约束 [\[For example\]][ch13-01]
* `while` - 基于一个表达式的结果判断是否进行循环 * `while` - 基于一个表达式的结果判断是否进行循环
[ch13-01]: ch13-01-closures.html#使用带有泛型和-fn-trait-的闭包
<!-- we should make sure the definitions for each keyword are consistently <!-- we should make sure the definitions for each keyword are consistently
phrased, so for example for enum we say "defining an enumeration" but for fn we phrased, so for example for enum we say "defining an enumeration" but for fn we
passively call it a "function definition" -- perhaps a good medium would be passively call it a "function definition" -- perhaps a good medium would be
@ -57,7 +60,7 @@ though. Please let me know if any still seem inconsistent /Carol -->
### 未使用的保留字 ### 未使用的保留字
这些关键字没有目前任何功能但是它们是Rust未来会使用的保留字。 这些关键字没有目前任何功能,但是它们是 Rust 未来会使用的保留字。
* `abstract` * `abstract`
* `alignof` * `alignof`
@ -75,4 +78,4 @@ though. Please let me know if any still seem inconsistent /Carol -->
* `typeof` * `typeof`
* `unsized` * `unsized`
* `virtual` * `virtual`
* `yield` * `yield`

Loading…
Cancel
Save