]> git.lizzy.rs Git - rust.git/blob - src/test/ui/array_const_index-1.stderr
Report const eval error inside the query
[rust.git] / src / test / ui / array_const_index-1.stderr
1 error: any use of this value will cause an error
2   --> $DIR/array_const_index-1.rs:12:1
3    |
4 LL | const B: i32 = A[1];
5    | ^^^^^^^^^^^^^^^----^
6    |                |
7    |                index out of bounds: the len is 0 but the index is 1
8    |
9    = note: #[deny(const_err)] on by default
10
11 error: any use of this value will cause an error
12   --> $DIR/array_const_index-1.rs:12:1
13    |
14 LL | const B: i32 = A[1];
15    | ^^^^^^^^^^^^^^^----^
16    |                |
17    |                index out of bounds: the len is 0 but the index is 1
18
19 error[E0080]: erroneous constant used
20   --> $DIR/array_const_index-1.rs:18:13
21    |
22 LL |     let _ = B; //~ ERROR erroneous constant used
23    |             ^ referenced constant has errors
24
25 error: aborting due to 3 previous errors
26
27 For more information about this error, try `rustc --explain E0080`.