]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-err-multi.stderr
dd3eaa4c47b9d3c41e722e6b22f8a2186f54c868
[rust.git] / src / test / ui / consts / const-err-multi.stderr
1 error: this constant cannot be used
2   --> $DIR/const-err-multi.rs:13:1
3    |
4 LL | pub const A: i8 = -std::i8::MIN;
5    | ^^^^^^^^^^^^^^^^^^-------------^
6    |                   |
7    |                   attempt to negate with overflow
8    |
9 note: lint level defined here
10   --> $DIR/const-err-multi.rs:11:9
11    |
12 LL | #![deny(const_err)]
13    |         ^^^^^^^^^
14
15 error: referenced constant has errors
16   --> $DIR/const-err-multi.rs:15:1
17    |
18 LL | pub const A: i8 = -std::i8::MIN;
19    |                   ------------- attempt to negate with overflow
20 LL | //~^ ERROR this constant cannot be used
21 LL | pub const B: i8 = A;
22    | ^^^^^^^^^^^^^^^^^^^^
23
24 error: this constant cannot be used
25   --> $DIR/const-err-multi.rs:15:1
26    |
27 LL | pub const B: i8 = A;
28    | ^^^^^^^^^^^^^^^^^^-^
29    |                   |
30    |                   referenced constant has errors
31
32 error: referenced constant has errors
33   --> $DIR/const-err-multi.rs:18:1
34    |
35 LL | pub const A: i8 = -std::i8::MIN;
36    |                   ------------- attempt to negate with overflow
37 ...
38 LL | pub const C: u8 = A as u8;
39    | ^^^^^^^^^^^^^^^^^^^^^^^^^^
40
41 error: this constant cannot be used
42   --> $DIR/const-err-multi.rs:18:1
43    |
44 LL | pub const C: u8 = A as u8;
45    | ^^^^^^^^^^^^^^^^^^-------^
46    |                   |
47    |                   referenced constant has errors
48
49 error: referenced constant has errors
50   --> $DIR/const-err-multi.rs:21:1
51    |
52 LL | pub const A: i8 = -std::i8::MIN;
53    |                   ------------- attempt to negate with overflow
54 ...
55 LL | pub const D: i8 = 50 - A;
56    | ^^^^^^^^^^^^^^^^^^^^^^^^^
57
58 error: this constant cannot be used
59   --> $DIR/const-err-multi.rs:21:1
60    |
61 LL | pub const D: i8 = 50 - A;
62    | ^^^^^^^^^^^^^^^^^^------^
63    |                   |
64    |                   referenced constant has errors
65
66 error: aborting due to 7 previous errors
67