mirror of
https://github.com/KaiserY/trpl-zh-cn
synced 2025-04-28 17:18:02 +08:00
update appendix-01 fix #499
This commit is contained in:
parent
dc8fede079
commit
4ded248e2b
@ -108,6 +108,6 @@ fn main() {
|
||||
|
||||
此代码编译没有任何错误。注意 `r#` 前缀需同时用于函数名定义和 `main` 函数中的调用。
|
||||
|
||||
原始标识符允许使用你选择的任何单词作为标识符,即使该单词恰好是保留关键字。 此外,原始标识符允许你使用以不同于你的 crate 使用的 Rust 版本编写的库。比如,`try` 在 2015 edition 中不是关键字,而在 2018 edition 则是。所以如果如果用 2015 edition 编写的库中带有 `try` 函数,在 2018 edition 中调用时就需要使用原始标识符语法,在这里是 `r#try`。有关版本的更多信息,请参见[附录 E][appendix-e].
|
||||
原始标识符允许使用你选择的任何单词作为标识符,即使该单词恰好是保留关键字。 此外,原始标识符允许你使用以不同于你的 crate 使用的 Rust 版本编写的库。比如,`try` 在 2015 edition 中不是关键字,而在 2018 edition 则是。所以如果用 2015 edition 编写的库中带有 `try` 函数,在 2018 edition 中调用时就需要使用原始标识符语法,在这里是 `r#try`。有关版本的更多信息,请参见[附录 E][appendix-e].
|
||||
|
||||
[appendix-e]: appendix-05-editions.html
|
||||
|
Loading…
Reference in New Issue
Block a user