]> git.lizzy.rs Git - rust.git/blob - tests/ui/consts/const-err-early.stderr
Auto merge of #106711 - albertlarsan68:use-ci-llvm-when-lld, r=jyn514
[rust.git] / tests / ui / consts / const-err-early.stderr
1 error[E0080]: evaluation of constant value failed
2   --> $DIR/const-err-early.rs:1:19
3    |
4 LL | pub const A: i8 = -i8::MIN;
5    |                   ^^^^^^^^ attempt to negate `i8::MIN`, which would overflow
6
7 error[E0080]: evaluation of constant value failed
8   --> $DIR/const-err-early.rs:2:19
9    |
10 LL | pub const B: u8 = 200u8 + 200u8;
11    |                   ^^^^^^^^^^^^^ attempt to compute `200_u8 + 200_u8`, which would overflow
12
13 error[E0080]: evaluation of constant value failed
14   --> $DIR/const-err-early.rs:3:19
15    |
16 LL | pub const C: u8 = 200u8 * 4;
17    |                   ^^^^^^^^^ attempt to compute `200_u8 * 4_u8`, which would overflow
18
19 error[E0080]: evaluation of constant value failed
20   --> $DIR/const-err-early.rs:4:19
21    |
22 LL | pub const D: u8 = 42u8 - (42u8 + 1);
23    |                   ^^^^^^^^^^^^^^^^^ attempt to compute `42_u8 - 43_u8`, which would overflow
24
25 error[E0080]: evaluation of constant value failed
26   --> $DIR/const-err-early.rs:5:19
27    |
28 LL | pub const E: u8 = [5u8][1];
29    |                   ^^^^^^^^ index out of bounds: the length is 1 but the index is 1
30
31 error: aborting due to 5 previous errors
32
33 For more information about this error, try `rustc --explain E0080`.