【发布时间】:2017-09-03 21:44:44
【问题描述】:
在 C++ 中,certain identifiers starting with underscores are reserved to be used by the compiler or the standard library。 Rust 中的标识符有类似的规则吗?当然,关键字(如if)不允许作为标识符,但除此之外:我可以使用任何我想要的标识符吗?
【问题讨论】:
-
好吧,至少以一个下划线开头似乎是未使用参数的常见做法。基于文本的宏的前奏和缺乏可能有助于减少保留标识符的数量。
标签: rust language-lawyer