]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-err.stderr
1674f99b6823dbfc44935e63acc1978ee2c6b620
[rust.git] / src / test / ui / consts / const-err.stderr
1 error[E0080]: referenced constant has errors
2   --> $DIR/const-err.rs:29:15
3    |
4 LL | const FOO: u8 = [5u8][1];
5    |                 -------- index out of bounds: the len is 1 but the index is 1
6 ...
7 LL |     black_box((FOO, FOO));
8    |               ^^^^^^^^^^
9
10 error[E0080]: could not evaluate constant
11   --> $DIR/const-err.rs:29:15
12    |
13 LL |     black_box((FOO, FOO));
14    |               ^^^^^^^^^^ referenced constant has errors
15
16 error[E0080]: constant evaluation error
17   --> $DIR/const-err.rs:24:1
18    |
19 LL | const FOO: u8 = [5u8][1];
20    | ^^^^^^^^^^^^^^^^--------^
21    |                 |
22    |                 index out of bounds: the len is 1 but the index is 1
23
24 error: aborting due to 3 previous errors
25
26 For more information about this error, try `rustc --explain E0080`.