diff options
| author | Daiki Ihara <sasurau4@gmail.com> | 2020-12-26 21:15:51 +0900 |
|---|---|---|
| committer | Daiki Ihara <sasurau4@gmail.com> | 2021-01-07 20:20:58 +0900 |
| commit | c71348a9c6d8c27c4d0a39428b7478c19b0c97d9 (patch) | |
| tree | fc74126b14b247f8ed0ee925a14b55b1f589ec23 /compiler | |
| parent | c9e7045e816496298cf2162731af55888f326935 (diff) | |
| download | rust-c71348a9c6d8c27c4d0a39428b7478c19b0c97d9.tar.gz rust-c71348a9c6d8c27c4d0a39428b7478c19b0c97d9.zip | |
Refine E0435 description
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_error_codes/src/error_codes/E0435.md | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/rustc_error_codes/src/error_codes/E0435.md b/compiler/rustc_error_codes/src/error_codes/E0435.md index 424e5ce1e2e..798a20d48b6 100644 --- a/compiler/rustc_error_codes/src/error_codes/E0435.md +++ b/compiler/rustc_error_codes/src/error_codes/E0435.md @@ -7,6 +7,12 @@ let foo = 42; let a: [u8; foo]; // error: attempt to use a non-constant value in a constant ``` +'constant' means 'a compile-time value'. + +More details can be found in the [Variables and Mutability] section of the book. + +[Variables and Mutability]: https://doc.rust-lang.org/book/ch03-01-variables-and-mutability.html#differences-between-variables-and-constants + To fix this error, please replace the value with a constant. Example: ``` |
