From 698f8c2f01ea549d77d7dc3338a12e04c11057b9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:02:58 +0200 Subject: Adding upstream version 1.64.0+dfsg1. Signed-off-by: Daniel Baumann --- .../ui/lint/lint-exceeding-bitshifts.noopt.stderr | 152 +++++++++++++++++++++ 1 file changed, 152 insertions(+) create mode 100644 src/test/ui/lint/lint-exceeding-bitshifts.noopt.stderr (limited to 'src/test/ui/lint/lint-exceeding-bitshifts.noopt.stderr') diff --git a/src/test/ui/lint/lint-exceeding-bitshifts.noopt.stderr b/src/test/ui/lint/lint-exceeding-bitshifts.noopt.stderr new file mode 100644 index 000000000..d7fd51461 --- /dev/null +++ b/src/test/ui/lint/lint-exceeding-bitshifts.noopt.stderr @@ -0,0 +1,152 @@ +warning: this arithmetic operation will overflow + --> $DIR/lint-exceeding-bitshifts.rs:18:20 + | +LL | const N: i32 = T::N << 42; + | ^^^^^^^^^^ attempt to shift left by `42_i32`, which would overflow + | +note: the lint level is defined here + --> $DIR/lint-exceeding-bitshifts.rs:10:9 + | +LL | #![warn(arithmetic_overflow, const_err)] + | ^^^^^^^^^^^^^^^^^^^ + +warning: this arithmetic operation will overflow + --> $DIR/lint-exceeding-bitshifts.rs:22:13 + | +LL | let _ = x << 42; + | ^^^^^^^ attempt to shift left by `42_i32`, which would overflow + +warning: this arithmetic operation will overflow + --> $DIR/lint-exceeding-bitshifts.rs:27:15 + | +LL | let n = 1u8 << 8; + | ^^^^^^^^ attempt to shift left by `8_i32`, which would overflow + +warning: this arithmetic operation will overflow + --> $DIR/lint-exceeding-bitshifts.rs:29:15 + | +LL | let n = 1u16 << 16; + | ^^^^^^^^^^ attempt to shift left by `16_i32`, which would overflow + +warning: this arithmetic operation will overflow + --> $DIR/lint-exceeding-bitshifts.rs:31:15 + | +LL | let n = 1u32 << 32; + | ^^^^^^^^^^ attempt to shift left by `32_i32`, which would overflow + +warning: this arithmetic operation will overflow + --> $DIR/lint-exceeding-bitshifts.rs:33:15 + | +LL | let n = 1u64 << 64; + | ^^^^^^^^^^ attempt to shift left by `64_i32`, which would overflow + +warning: this arithmetic operation will overflow + --> $DIR/lint-exceeding-bitshifts.rs:35:15 + | +LL | let n = 1i8 << 8; + | ^^^^^^^^ attempt to shift left by `8_i32`, which would overflow + +warning: this arithmetic operation will overflow + --> $DIR/lint-exceeding-bitshifts.rs:37:15 + | +LL | let n = 1i16 << 16; + | ^^^^^^^^^^ attempt to shift left by `16_i32`, which would overflow + +warning: this arithmetic operation will overflow + --> $DIR/lint-exceeding-bitshifts.rs:39:15 + | +LL | let n = 1i32 << 32; + | ^^^^^^^^^^ attempt to shift left by `32_i32`, which would overflow + +warning: this arithmetic operation will overflow + --> $DIR/lint-exceeding-bitshifts.rs:41:15 + | +LL | let n = 1i64 << 64; + | ^^^^^^^^^^ attempt to shift left by `64_i32`, which would overflow + +warning: this arithmetic operation will overflow + --> $DIR/lint-exceeding-bitshifts.rs:44:15 + | +LL | let n = 1u8 >> 8; + | ^^^^^^^^ attempt to shift right by `8_i32`, which would overflow + +warning: this arithmetic operation will overflow + --> $DIR/lint-exceeding-bitshifts.rs:46:15 + | +LL | let n = 1u16 >> 16; + | ^^^^^^^^^^ attempt to shift right by `16_i32`, which would overflow + +warning: this arithmetic operation will overflow + --> $DIR/lint-exceeding-bitshifts.rs:48:15 + | +LL | let n = 1u32 >> 32; + | ^^^^^^^^^^ attempt to shift right by `32_i32`, which would overflow + +warning: this arithmetic operation will overflow + --> $DIR/lint-exceeding-bitshifts.rs:50:15 + | +LL | let n = 1u64 >> 64; + | ^^^^^^^^^^ attempt to shift right by `64_i32`, which would overflow + +warning: this arithmetic operation will overflow + --> $DIR/lint-exceeding-bitshifts.rs:52:15 + | +LL | let n = 1i8 >> 8; + | ^^^^^^^^ attempt to shift right by `8_i32`, which would overflow + +warning: this arithmetic operation will overflow + --> $DIR/lint-exceeding-bitshifts.rs:54:15 + | +LL | let n = 1i16 >> 16; + | ^^^^^^^^^^ attempt to shift right by `16_i32`, which would overflow + +warning: this arithmetic operation will overflow + --> $DIR/lint-exceeding-bitshifts.rs:56:15 + | +LL | let n = 1i32 >> 32; + | ^^^^^^^^^^ attempt to shift right by `32_i32`, which would overflow + +warning: this arithmetic operation will overflow + --> $DIR/lint-exceeding-bitshifts.rs:58:15 + | +LL | let n = 1i64 >> 64; + | ^^^^^^^^^^ attempt to shift right by `64_i32`, which would overflow + +warning: this arithmetic operation will overflow + --> $DIR/lint-exceeding-bitshifts.rs:62:15 + | +LL | let n = n << 8; + | ^^^^^^ attempt to shift left by `8_i32`, which would overflow + +warning: this arithmetic operation will overflow + --> $DIR/lint-exceeding-bitshifts.rs:64:15 + | +LL | let n = 1u8 << -8; + | ^^^^^^^^^ attempt to shift left by `-8_i32`, which would overflow + +warning: this arithmetic operation will overflow + --> $DIR/lint-exceeding-bitshifts.rs:69:15 + | +LL | let n = 1u8 << (4+4); + | ^^^^^^^^^^^^ attempt to shift left by `8_i32`, which would overflow + +warning: this arithmetic operation will overflow + --> $DIR/lint-exceeding-bitshifts.rs:71:15 + | +LL | let n = 1i64 >> [64][0]; + | ^^^^^^^^^^^^^^^ attempt to shift right by `64_i32`, which would overflow + +warning: this arithmetic operation will overflow + --> $DIR/lint-exceeding-bitshifts.rs:77:15 + | +LL | let n = 1_isize << BITS; + | ^^^^^^^^^^^^^^^ attempt to shift left by `%BITS%`, which would overflow + +warning: this arithmetic operation will overflow + --> $DIR/lint-exceeding-bitshifts.rs:78:15 + | +LL | let n = 1_usize << BITS; + | ^^^^^^^^^^^^^^^ attempt to shift left by `%BITS%`, which would overflow + +warning: 24 warnings emitted + -- cgit v1.2.3