提交 f5dfd9b3 编写于 作者: B Brian Anderson

docs: Tweaks to section on constants

上级 4155a60c
......@@ -487,17 +487,10 @@ const MY_VECTORY_PASSWORD: [int * 5] = [1, 2, 3, 4, 5];
const MY_STRINGY_PASSWORD: &static/str = "12345";
// Structs
struct Password {
value: int
}
struct Password { value: int }
const MY_STRUCTY_PASSWORD: Password = Password { value: MY_PASSWORD };
~~~
> ***Note:*** Support for compile-time constants and constant
> evaluation is essentially added 'as needed'. You may find that
> things you expect to work do not.
## Operators
Rust's set of operators contains very few surprises. Arithmetic is done with
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册