diff --git a/src/test/ui/lint/lint-exceeding-bitshifts.noopt.stderr b/src/test/ui/lint/lint-exceeding-bitshifts.noopt.stderr index a2fb5ad8b8b..0c328a2594a 100644 --- a/src/test/ui/lint/lint-exceeding-bitshifts.noopt.stderr +++ b/src/test/ui/lint/lint-exceeding-bitshifts.noopt.stderr @@ -1,149 +1,149 @@ warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:18:20 + --> $DIR/lint-exceeding-bitshifts.rs:17:20 | LL | const N: i32 = T::N << 42; | ^^^^^^^^^^ attempt to shift left with overflow | note: the lint level is defined here - --> $DIR/lint-exceeding-bitshifts.rs:9:9 + --> $DIR/lint-exceeding-bitshifts.rs:8:9 | LL | #![warn(arithmetic_overflow, const_err)] | ^^^^^^^^^^^^^^^^^^^ warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:22:13 + --> $DIR/lint-exceeding-bitshifts.rs:21:13 | LL | let _ = x << 42; | ^^^^^^^ attempt to shift left with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:27:15 + --> $DIR/lint-exceeding-bitshifts.rs:26:15 | LL | let n = 1u8 << 8; | ^^^^^^^^ attempt to shift left with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:29:15 + --> $DIR/lint-exceeding-bitshifts.rs:28:15 | LL | let n = 1u16 << 16; | ^^^^^^^^^^ attempt to shift left with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:31:15 + --> $DIR/lint-exceeding-bitshifts.rs:30:15 | LL | let n = 1u32 << 32; | ^^^^^^^^^^ attempt to shift left with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:33:15 + --> $DIR/lint-exceeding-bitshifts.rs:32:15 | LL | let n = 1u64 << 64; | ^^^^^^^^^^ attempt to shift left with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:35:15 + --> $DIR/lint-exceeding-bitshifts.rs:34:15 | LL | let n = 1i8 << 8; | ^^^^^^^^ attempt to shift left with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:37:15 + --> $DIR/lint-exceeding-bitshifts.rs:36:15 | LL | let n = 1i16 << 16; | ^^^^^^^^^^ attempt to shift left with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:39:15 + --> $DIR/lint-exceeding-bitshifts.rs:38:15 | LL | let n = 1i32 << 32; | ^^^^^^^^^^ attempt to shift left with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:41:15 + --> $DIR/lint-exceeding-bitshifts.rs:40:15 | LL | let n = 1i64 << 64; | ^^^^^^^^^^ attempt to shift left with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:44:15 + --> $DIR/lint-exceeding-bitshifts.rs:43:15 | LL | let n = 1u8 >> 8; | ^^^^^^^^ attempt to shift right with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:46:15 + --> $DIR/lint-exceeding-bitshifts.rs:45:15 | LL | let n = 1u16 >> 16; | ^^^^^^^^^^ attempt to shift right with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:48:15 + --> $DIR/lint-exceeding-bitshifts.rs:47:15 | LL | let n = 1u32 >> 32; | ^^^^^^^^^^ attempt to shift right with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:50:15 + --> $DIR/lint-exceeding-bitshifts.rs:49:15 | LL | let n = 1u64 >> 64; | ^^^^^^^^^^ attempt to shift right with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:52:15 + --> $DIR/lint-exceeding-bitshifts.rs:51:15 | LL | let n = 1i8 >> 8; | ^^^^^^^^ attempt to shift right with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:54:15 + --> $DIR/lint-exceeding-bitshifts.rs:53:15 | LL | let n = 1i16 >> 16; | ^^^^^^^^^^ attempt to shift right with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:56:15 + --> $DIR/lint-exceeding-bitshifts.rs:55:15 | LL | let n = 1i32 >> 32; | ^^^^^^^^^^ attempt to shift right with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:58:15 + --> $DIR/lint-exceeding-bitshifts.rs:57:15 | LL | let n = 1i64 >> 64; | ^^^^^^^^^^ attempt to shift right with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:62:15 + --> $DIR/lint-exceeding-bitshifts.rs:61:15 | LL | let n = n << 8; | ^^^^^^ attempt to shift left with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:64:15 + --> $DIR/lint-exceeding-bitshifts.rs:63:15 | LL | let n = 1u8 << -8; | ^^^^^^^^^ attempt to shift left with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:69:15 + --> $DIR/lint-exceeding-bitshifts.rs:68:15 | LL | let n = 1u8 << (4+4); | ^^^^^^^^^^^^ attempt to shift left with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:71:15 + --> $DIR/lint-exceeding-bitshifts.rs:70:15 | LL | let n = 1i64 >> [64][0]; | ^^^^^^^^^^^^^^^ attempt to shift right with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:77:15 + --> $DIR/lint-exceeding-bitshifts.rs:76:15 | LL | let n = 1_isize << BITS; | ^^^^^^^^^^^^^^^ attempt to shift left with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:78:15 + --> $DIR/lint-exceeding-bitshifts.rs:77:15 | LL | let n = 1_usize << BITS; | ^^^^^^^^^^^^^^^ attempt to shift left with overflow diff --git a/src/test/ui/lint/lint-exceeding-bitshifts.opt.stderr b/src/test/ui/lint/lint-exceeding-bitshifts.opt.stderr index a2fb5ad8b8b..0c328a2594a 100644 --- a/src/test/ui/lint/lint-exceeding-bitshifts.opt.stderr +++ b/src/test/ui/lint/lint-exceeding-bitshifts.opt.stderr @@ -1,149 +1,149 @@ warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:18:20 + --> $DIR/lint-exceeding-bitshifts.rs:17:20 | LL | const N: i32 = T::N << 42; | ^^^^^^^^^^ attempt to shift left with overflow | note: the lint level is defined here - --> $DIR/lint-exceeding-bitshifts.rs:9:9 + --> $DIR/lint-exceeding-bitshifts.rs:8:9 | LL | #![warn(arithmetic_overflow, const_err)] | ^^^^^^^^^^^^^^^^^^^ warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:22:13 + --> $DIR/lint-exceeding-bitshifts.rs:21:13 | LL | let _ = x << 42; | ^^^^^^^ attempt to shift left with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:27:15 + --> $DIR/lint-exceeding-bitshifts.rs:26:15 | LL | let n = 1u8 << 8; | ^^^^^^^^ attempt to shift left with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:29:15 + --> $DIR/lint-exceeding-bitshifts.rs:28:15 | LL | let n = 1u16 << 16; | ^^^^^^^^^^ attempt to shift left with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:31:15 + --> $DIR/lint-exceeding-bitshifts.rs:30:15 | LL | let n = 1u32 << 32; | ^^^^^^^^^^ attempt to shift left with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:33:15 + --> $DIR/lint-exceeding-bitshifts.rs:32:15 | LL | let n = 1u64 << 64; | ^^^^^^^^^^ attempt to shift left with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:35:15 + --> $DIR/lint-exceeding-bitshifts.rs:34:15 | LL | let n = 1i8 << 8; | ^^^^^^^^ attempt to shift left with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:37:15 + --> $DIR/lint-exceeding-bitshifts.rs:36:15 | LL | let n = 1i16 << 16; | ^^^^^^^^^^ attempt to shift left with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:39:15 + --> $DIR/lint-exceeding-bitshifts.rs:38:15 | LL | let n = 1i32 << 32; | ^^^^^^^^^^ attempt to shift left with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:41:15 + --> $DIR/lint-exceeding-bitshifts.rs:40:15 | LL | let n = 1i64 << 64; | ^^^^^^^^^^ attempt to shift left with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:44:15 + --> $DIR/lint-exceeding-bitshifts.rs:43:15 | LL | let n = 1u8 >> 8; | ^^^^^^^^ attempt to shift right with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:46:15 + --> $DIR/lint-exceeding-bitshifts.rs:45:15 | LL | let n = 1u16 >> 16; | ^^^^^^^^^^ attempt to shift right with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:48:15 + --> $DIR/lint-exceeding-bitshifts.rs:47:15 | LL | let n = 1u32 >> 32; | ^^^^^^^^^^ attempt to shift right with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:50:15 + --> $DIR/lint-exceeding-bitshifts.rs:49:15 | LL | let n = 1u64 >> 64; | ^^^^^^^^^^ attempt to shift right with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:52:15 + --> $DIR/lint-exceeding-bitshifts.rs:51:15 | LL | let n = 1i8 >> 8; | ^^^^^^^^ attempt to shift right with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:54:15 + --> $DIR/lint-exceeding-bitshifts.rs:53:15 | LL | let n = 1i16 >> 16; | ^^^^^^^^^^ attempt to shift right with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:56:15 + --> $DIR/lint-exceeding-bitshifts.rs:55:15 | LL | let n = 1i32 >> 32; | ^^^^^^^^^^ attempt to shift right with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:58:15 + --> $DIR/lint-exceeding-bitshifts.rs:57:15 | LL | let n = 1i64 >> 64; | ^^^^^^^^^^ attempt to shift right with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:62:15 + --> $DIR/lint-exceeding-bitshifts.rs:61:15 | LL | let n = n << 8; | ^^^^^^ attempt to shift left with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:64:15 + --> $DIR/lint-exceeding-bitshifts.rs:63:15 | LL | let n = 1u8 << -8; | ^^^^^^^^^ attempt to shift left with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:69:15 + --> $DIR/lint-exceeding-bitshifts.rs:68:15 | LL | let n = 1u8 << (4+4); | ^^^^^^^^^^^^ attempt to shift left with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:71:15 + --> $DIR/lint-exceeding-bitshifts.rs:70:15 | LL | let n = 1i64 >> [64][0]; | ^^^^^^^^^^^^^^^ attempt to shift right with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:77:15 + --> $DIR/lint-exceeding-bitshifts.rs:76:15 | LL | let n = 1_isize << BITS; | ^^^^^^^^^^^^^^^ attempt to shift left with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:78:15 + --> $DIR/lint-exceeding-bitshifts.rs:77:15 | LL | let n = 1_usize << BITS; | ^^^^^^^^^^^^^^^ attempt to shift left with overflow diff --git a/src/test/ui/lint/lint-exceeding-bitshifts.opt_with_overflow_checks.stderr b/src/test/ui/lint/lint-exceeding-bitshifts.opt_with_overflow_checks.stderr index a2fb5ad8b8b..0c328a2594a 100644 --- a/src/test/ui/lint/lint-exceeding-bitshifts.opt_with_overflow_checks.stderr +++ b/src/test/ui/lint/lint-exceeding-bitshifts.opt_with_overflow_checks.stderr @@ -1,149 +1,149 @@ warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:18:20 + --> $DIR/lint-exceeding-bitshifts.rs:17:20 | LL | const N: i32 = T::N << 42; | ^^^^^^^^^^ attempt to shift left with overflow | note: the lint level is defined here - --> $DIR/lint-exceeding-bitshifts.rs:9:9 + --> $DIR/lint-exceeding-bitshifts.rs:8:9 | LL | #![warn(arithmetic_overflow, const_err)] | ^^^^^^^^^^^^^^^^^^^ warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:22:13 + --> $DIR/lint-exceeding-bitshifts.rs:21:13 | LL | let _ = x << 42; | ^^^^^^^ attempt to shift left with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:27:15 + --> $DIR/lint-exceeding-bitshifts.rs:26:15 | LL | let n = 1u8 << 8; | ^^^^^^^^ attempt to shift left with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:29:15 + --> $DIR/lint-exceeding-bitshifts.rs:28:15 | LL | let n = 1u16 << 16; | ^^^^^^^^^^ attempt to shift left with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:31:15 + --> $DIR/lint-exceeding-bitshifts.rs:30:15 | LL | let n = 1u32 << 32; | ^^^^^^^^^^ attempt to shift left with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:33:15 + --> $DIR/lint-exceeding-bitshifts.rs:32:15 | LL | let n = 1u64 << 64; | ^^^^^^^^^^ attempt to shift left with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:35:15 + --> $DIR/lint-exceeding-bitshifts.rs:34:15 | LL | let n = 1i8 << 8; | ^^^^^^^^ attempt to shift left with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:37:15 + --> $DIR/lint-exceeding-bitshifts.rs:36:15 | LL | let n = 1i16 << 16; | ^^^^^^^^^^ attempt to shift left with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:39:15 + --> $DIR/lint-exceeding-bitshifts.rs:38:15 | LL | let n = 1i32 << 32; | ^^^^^^^^^^ attempt to shift left with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:41:15 + --> $DIR/lint-exceeding-bitshifts.rs:40:15 | LL | let n = 1i64 << 64; | ^^^^^^^^^^ attempt to shift left with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:44:15 + --> $DIR/lint-exceeding-bitshifts.rs:43:15 | LL | let n = 1u8 >> 8; | ^^^^^^^^ attempt to shift right with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:46:15 + --> $DIR/lint-exceeding-bitshifts.rs:45:15 | LL | let n = 1u16 >> 16; | ^^^^^^^^^^ attempt to shift right with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:48:15 + --> $DIR/lint-exceeding-bitshifts.rs:47:15 | LL | let n = 1u32 >> 32; | ^^^^^^^^^^ attempt to shift right with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:50:15 + --> $DIR/lint-exceeding-bitshifts.rs:49:15 | LL | let n = 1u64 >> 64; | ^^^^^^^^^^ attempt to shift right with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:52:15 + --> $DIR/lint-exceeding-bitshifts.rs:51:15 | LL | let n = 1i8 >> 8; | ^^^^^^^^ attempt to shift right with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:54:15 + --> $DIR/lint-exceeding-bitshifts.rs:53:15 | LL | let n = 1i16 >> 16; | ^^^^^^^^^^ attempt to shift right with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:56:15 + --> $DIR/lint-exceeding-bitshifts.rs:55:15 | LL | let n = 1i32 >> 32; | ^^^^^^^^^^ attempt to shift right with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:58:15 + --> $DIR/lint-exceeding-bitshifts.rs:57:15 | LL | let n = 1i64 >> 64; | ^^^^^^^^^^ attempt to shift right with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:62:15 + --> $DIR/lint-exceeding-bitshifts.rs:61:15 | LL | let n = n << 8; | ^^^^^^ attempt to shift left with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:64:15 + --> $DIR/lint-exceeding-bitshifts.rs:63:15 | LL | let n = 1u8 << -8; | ^^^^^^^^^ attempt to shift left with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:69:15 + --> $DIR/lint-exceeding-bitshifts.rs:68:15 | LL | let n = 1u8 << (4+4); | ^^^^^^^^^^^^ attempt to shift left with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:71:15 + --> $DIR/lint-exceeding-bitshifts.rs:70:15 | LL | let n = 1i64 >> [64][0]; | ^^^^^^^^^^^^^^^ attempt to shift right with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:77:15 + --> $DIR/lint-exceeding-bitshifts.rs:76:15 | LL | let n = 1_isize << BITS; | ^^^^^^^^^^^^^^^ attempt to shift left with overflow warning: this arithmetic operation will overflow - --> $DIR/lint-exceeding-bitshifts.rs:78:15 + --> $DIR/lint-exceeding-bitshifts.rs:77:15 | LL | let n = 1_usize << BITS; | ^^^^^^^^^^^^^^^ attempt to shift left with overflow