diff options
| author | Brian Anderson <banderson@mozilla.com> | 2012-10-04 19:47:09 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-10-04 19:47:20 -0700 |
| commit | f5dfd9b3ce5dd6fbe567ba07e89c70a4db2c4cd4 (patch) | |
| tree | 34c9246177975ca7e61cc5478182c7f94f34e48b | |
| parent | 4155a60c75fbfe322207e99b7bd541bedf088ada (diff) | |
| download | rust-f5dfd9b3ce5dd6fbe567ba07e89c70a4db2c4cd4.tar.gz rust-f5dfd9b3ce5dd6fbe567ba07e89c70a4db2c4cd4.zip | |
docs: Tweaks to section on constants
| -rw-r--r-- | doc/tutorial.md | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/doc/tutorial.md b/doc/tutorial.md index a7e627fa08e..3393964b845 100644 --- a/doc/tutorial.md +++ b/doc/tutorial.md @@ -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 |
