Skip to content

Commit c71348a

Browse files
committed
Refine E0435 description
1 parent c9e7045 commit c71348a

File tree

1 file changed

+6
-0
lines changed
  • compiler/rustc_error_codes/src/error_codes

1 file changed

+6
-0
lines changed

compiler/rustc_error_codes/src/error_codes/E0435.md

+6
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ let foo = 42;
77
let a: [u8; foo]; // error: attempt to use a non-constant value in a constant
88
```
99

10+
'constant' means 'a compile-time value'.
11+
12+
More details can be found in the [Variables and Mutability] section of the book.
13+
14+
[Variables and Mutability]: https://doc.rust-lang.org/book/ch03-01-variables-and-mutability.html#differences-between-variables-and-constants
15+
1016
To fix this error, please replace the value with a constant. Example:
1117

1218
```

0 commit comments

Comments
 (0)