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