]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-err-early.stderr
Auto merge of #54624 - arielb1:evaluate-outlives, r=nikomatsakis
[rust.git] / src / test / ui / consts / const-err-early.stderr
1 error: this constant cannot be used
2   --> $DIR/const-err-early.rs:13:1
3    |
4 LL | pub const A: i8 = -std::i8::MIN; //~ ERROR const_err
5    | ^^^^^^^^^^^^^^^^^^-------------^
6    |                   |
7    |                   attempt to negate with overflow
8    |
9 note: lint level defined here
10   --> $DIR/const-err-early.rs:11:9
11    |
12 LL | #![deny(const_err)]
13    |         ^^^^^^^^^
14
15 error: this constant cannot be used
16   --> $DIR/const-err-early.rs:14:1
17    |
18 LL | pub const B: u8 = 200u8 + 200u8; //~ ERROR const_err
19    | ^^^^^^^^^^^^^^^^^^-------------^
20    |                   |
21    |                   attempt to add with overflow
22
23 error: this constant cannot be used
24   --> $DIR/const-err-early.rs:15:1
25    |
26 LL | pub const C: u8 = 200u8 * 4; //~ ERROR const_err
27    | ^^^^^^^^^^^^^^^^^^---------^
28    |                   |
29    |                   attempt to multiply with overflow
30
31 error: this constant cannot be used
32   --> $DIR/const-err-early.rs:16:1
33    |
34 LL | pub const D: u8 = 42u8 - (42u8 + 1); //~ ERROR const_err
35    | ^^^^^^^^^^^^^^^^^^-----------------^
36    |                   |
37    |                   attempt to subtract with overflow
38
39 error: this constant cannot be used
40   --> $DIR/const-err-early.rs:17:1
41    |
42 LL | pub const E: u8 = [5u8][1]; //~ ERROR const_err
43    | ^^^^^^^^^^^^^^^^^^--------^
44    |                   |
45    |                   index out of bounds: the len is 1 but the index is 1
46
47 error: aborting due to 5 previous errors
48