rust/tests/ui/consts/const-err-multi.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
695 B
Plaintext
Raw Normal View History

2022-09-21 06:05:20 -05:00
error[E0080]: evaluation of constant value failed
--> $DIR/const-err-multi.rs:1:19
2018-08-08 07:28:26 -05:00
|
LL | pub const A: i8 = -i8::MIN;
2022-09-21 06:05:20 -05:00
| ^^^^^^^^ attempt to negate `i8::MIN`, which would overflow
2018-08-08 07:28:26 -05:00
note: erroneous constant used
2022-09-21 06:05:20 -05:00
--> $DIR/const-err-multi.rs:3:19
2018-08-08 07:28:26 -05:00
|
LL | pub const B: i8 = A;
| ^
2018-08-08 07:28:26 -05:00
note: erroneous constant used
2022-09-21 06:05:20 -05:00
--> $DIR/const-err-multi.rs:5:19
2018-08-08 07:28:26 -05:00
|
LL | pub const C: u8 = A as u8;
| ^
2018-08-08 07:28:26 -05:00
note: erroneous constant used
2022-09-21 06:05:20 -05:00
--> $DIR/const-err-multi.rs:7:24
2018-08-08 07:28:26 -05:00
|
LL | pub const D: i8 = 50 - A;
| ^
2018-08-08 07:28:26 -05:00
error: aborting due to previous error
2018-08-08 07:28:26 -05:00
2022-09-21 06:05:20 -05:00
For more information about this error, try `rustc --explain E0080`.