Refine E0435 description

This commit is contained in:
Daiki Ihara 2020-12-26 21:15:51 +09:00
parent c9e7045e81
commit c71348a9c6
1 changed files with 6 additions and 0 deletions

View File

@ -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:
```