rust/tests/ui/consts/const-eval/const-eval-overflow2.stderr
Ralf Jung 17946c22b1 const-eval error: always say in which item the error occurred
also adjust the wording a little so that we don't say "the error occurred here" for two different spans
2025-06-07 13:42:30 +02:00

52 lines
1.7 KiB
Plaintext

error[E0080]: attempt to compute `i8::MIN - 1_i8`, which would overflow
--> $DIR/const-eval-overflow2.rs:12:6
|
LL | i8::MIN - 1,
| ^^^^^^^^^^^ evaluation of `VALS_I8` failed here
error[E0080]: attempt to compute `i16::MIN - 1_i16`, which would overflow
--> $DIR/const-eval-overflow2.rs:18:6
|
LL | i16::MIN - 1,
| ^^^^^^^^^^^^ evaluation of `VALS_I16` failed here
error[E0080]: attempt to compute `i32::MIN - 1_i32`, which would overflow
--> $DIR/const-eval-overflow2.rs:24:6
|
LL | i32::MIN - 1,
| ^^^^^^^^^^^^ evaluation of `VALS_I32` failed here
error[E0080]: attempt to compute `i64::MIN - 1_i64`, which would overflow
--> $DIR/const-eval-overflow2.rs:30:6
|
LL | i64::MIN - 1,
| ^^^^^^^^^^^^ evaluation of `VALS_I64` failed here
error[E0080]: attempt to compute `0_u8 - 1_u8`, which would overflow
--> $DIR/const-eval-overflow2.rs:36:6
|
LL | u8::MIN - 1,
| ^^^^^^^^^^^ evaluation of `VALS_U8` failed here
error[E0080]: attempt to compute `0_u16 - 1_u16`, which would overflow
--> $DIR/const-eval-overflow2.rs:41:6
|
LL | u16::MIN - 1,
| ^^^^^^^^^^^^ evaluation of `VALS_U16` failed here
error[E0080]: attempt to compute `0_u32 - 1_u32`, which would overflow
--> $DIR/const-eval-overflow2.rs:46:6
|
LL | u32::MIN - 1,
| ^^^^^^^^^^^^ evaluation of `VALS_U32` failed here
error[E0080]: attempt to compute `0_u64 - 1_u64`, which would overflow
--> $DIR/const-eval-overflow2.rs:52:6
|
LL | u64::MIN - 1,
| ^^^^^^^^^^^^ evaluation of `VALS_U64` failed here
error: aborting due to 8 previous errors
For more information about this error, try `rustc --explain E0080`.