diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:03 +0000 |
commit | 64d98f8ee037282c35007b64c2649055c56af1db (patch) | |
tree | 5492bcf97fce41ee1c0b1cc2add283f3e66cdab0 /tests/ui/consts/const-err2.noopt.stderr | |
parent | Adding debian version 1.67.1+dfsg1-1. (diff) | |
download | rustc-64d98f8ee037282c35007b64c2649055c56af1db.tar.xz rustc-64d98f8ee037282c35007b64c2649055c56af1db.zip |
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/consts/const-err2.noopt.stderr')
-rw-r--r-- | tests/ui/consts/const-err2.noopt.stderr | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/tests/ui/consts/const-err2.noopt.stderr b/tests/ui/consts/const-err2.noopt.stderr new file mode 100644 index 000000000..8b1688c4a --- /dev/null +++ b/tests/ui/consts/const-err2.noopt.stderr @@ -0,0 +1,48 @@ +error: this arithmetic operation will overflow + --> $DIR/const-err2.rs:19:13 + | +LL | let a = -i8::MIN; + | ^^^^^^^^ attempt to negate `i8::MIN`, which would overflow + | + = note: `#[deny(arithmetic_overflow)]` on by default + +error: this arithmetic operation will overflow + --> $DIR/const-err2.rs:21:18 + | +LL | let a_i128 = -i128::MIN; + | ^^^^^^^^^^ attempt to negate `i128::MIN`, which would overflow + +error: this arithmetic operation will overflow + --> $DIR/const-err2.rs:23:13 + | +LL | let b = 200u8 + 200u8 + 200u8; + | ^^^^^^^^^^^^^ attempt to compute `200_u8 + 200_u8`, which would overflow + +error: this arithmetic operation will overflow + --> $DIR/const-err2.rs:25:18 + | +LL | let b_i128 = i128::MIN - i128::MAX; + | ^^^^^^^^^^^^^^^^^^^^^ attempt to compute `i128::MIN - i128::MAX`, which would overflow + +error: this arithmetic operation will overflow + --> $DIR/const-err2.rs:27:13 + | +LL | let c = 200u8 * 4; + | ^^^^^^^^^ attempt to compute `200_u8 * 4_u8`, which would overflow + +error: this arithmetic operation will overflow + --> $DIR/const-err2.rs:29:13 + | +LL | let d = 42u8 - (42u8 + 1); + | ^^^^^^^^^^^^^^^^^ attempt to compute `42_u8 - 43_u8`, which would overflow + +error: this operation will panic at runtime + --> $DIR/const-err2.rs:31:14 + | +LL | let _e = [5u8][1]; + | ^^^^^^^^ index out of bounds: the length is 1 but the index is 1 + | + = note: `#[deny(unconditional_panic)]` on by default + +error: aborting due to 7 previous errors + |