From 218caa410aa38c29984be31a5229b9fa717560ee Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:13 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- .../consts/const-eval/const-eval-overflow2.stderr | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 tests/ui/consts/const-eval/const-eval-overflow2.stderr (limited to 'tests/ui/consts/const-eval/const-eval-overflow2.stderr') diff --git a/tests/ui/consts/const-eval/const-eval-overflow2.stderr b/tests/ui/consts/const-eval/const-eval-overflow2.stderr new file mode 100644 index 000000000..341c15daf --- /dev/null +++ b/tests/ui/consts/const-eval/const-eval-overflow2.stderr @@ -0,0 +1,51 @@ +error[E0080]: evaluation of constant value failed + --> $DIR/const-eval-overflow2.rs:12:6 + | +LL | i8::MIN - 1, + | ^^^^^^^^^^^ attempt to compute `i8::MIN - 1_i8`, which would overflow + +error[E0080]: evaluation of constant value failed + --> $DIR/const-eval-overflow2.rs:18:6 + | +LL | i16::MIN - 1, + | ^^^^^^^^^^^^ attempt to compute `i16::MIN - 1_i16`, which would overflow + +error[E0080]: evaluation of constant value failed + --> $DIR/const-eval-overflow2.rs:24:6 + | +LL | i32::MIN - 1, + | ^^^^^^^^^^^^ attempt to compute `i32::MIN - 1_i32`, which would overflow + +error[E0080]: evaluation of constant value failed + --> $DIR/const-eval-overflow2.rs:30:6 + | +LL | i64::MIN - 1, + | ^^^^^^^^^^^^ attempt to compute `i64::MIN - 1_i64`, which would overflow + +error[E0080]: evaluation of constant value failed + --> $DIR/const-eval-overflow2.rs:36:6 + | +LL | u8::MIN - 1, + | ^^^^^^^^^^^ attempt to compute `0_u8 - 1_u8`, which would overflow + +error[E0080]: evaluation of constant value failed + --> $DIR/const-eval-overflow2.rs:41:6 + | +LL | u16::MIN - 1, + | ^^^^^^^^^^^^ attempt to compute `0_u16 - 1_u16`, which would overflow + +error[E0080]: evaluation of constant value failed + --> $DIR/const-eval-overflow2.rs:46:6 + | +LL | u32::MIN - 1, + | ^^^^^^^^^^^^ attempt to compute `0_u32 - 1_u32`, which would overflow + +error[E0080]: evaluation of constant value failed + --> $DIR/const-eval-overflow2.rs:52:6 + | +LL | u64::MIN - 1, + | ^^^^^^^^^^^^ attempt to compute `0_u64 - 1_u64`, which would overflow + +error: aborting due to 8 previous errors + +For more information about this error, try `rustc --explain E0080`. -- cgit v1.2.3