]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-err.stderr
Merge commit 'cb7915b00c235e9b5861564f3be78dba330980ee' into clippyup
[rust.git] / src / test / ui / consts / const-err.stderr
1 warning: any use of this value will cause an error
2   --> $DIR/const-err.rs:11:17
3    |
4 LL | const FOO: u8 = [5u8][1];
5    | ----------------^^^^^^^^-
6    |                 |
7    |                 index out of bounds: the length is 1 but the index is 1
8    |
9 note: the lint level is defined here
10   --> $DIR/const-err.rs:5:9
11    |
12 LL | #![warn(const_err)]
13    |         ^^^^^^^^^
14    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
15    = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
16
17 error[E0080]: erroneous constant used
18   --> $DIR/const-err.rs:16:16
19    |
20 LL |     black_box((FOO, FOO));
21    |                ^^^ referenced constant has errors
22
23 error[E0080]: erroneous constant used
24   --> $DIR/const-err.rs:16:21
25    |
26 LL |     black_box((FOO, FOO));
27    |                     ^^^ referenced constant has errors
28
29 error: aborting due to 2 previous errors; 1 warning emitted
30
31 For more information about this error, try `rustc --explain E0080`.