Refine E0435 description
This commit is contained in:
parent
c9e7045e81
commit
c71348a9c6
|
@ -7,6 +7,12 @@ let foo = 42;
|
||||||
let a: [u8; foo]; // error: attempt to use a non-constant value in a constant
|
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:
|
To fix this error, please replace the value with a constant. Example:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue