]> git.lizzy.rs Git - rust.git/blob - tests/ui/consts/issue-91560.stderr
Auto merge of #105102 - compiler-errors:copy-impl-considering-regions, r=lcnr
[rust.git] / tests / ui / consts / issue-91560.stderr
1 error[E0435]: attempt to use a non-constant value in a constant
2   --> $DIR/issue-91560.rs:10:19
3    |
4 LL |     let mut length: usize = 2;
5    |     -------------- help: consider using `const` instead of `let`: `const length`
6 LL |
7 LL |     let arr = [0; length];
8    |                   ^^^^^^ non-constant value
9
10 error[E0435]: attempt to use a non-constant value in a constant
11   --> $DIR/issue-91560.rs:17:19
12    |
13 LL |     let   length: usize = 2;
14    |     ------------ help: consider using `const` instead of `let`: `const length`
15 LL |
16 LL |     let arr = [0; length];
17    |                   ^^^^^^ non-constant value
18
19 error: aborting due to 2 previous errors
20
21 For more information about this error, try `rustc --explain E0435`.