Fix lint-exceeding-bitshifts ui tests

This commit is contained in:
Wesley Wiser 2019-09-27 20:09:52 -04:00
parent a99f255015
commit ba2d6c42fc
4 changed files with 27 additions and 23 deletions

View File

@ -1,3 +1,5 @@
// compile-flags: -O
#![deny(exceeding_bitshifts, const_err)]
#![allow(unused_variables)]
#![allow(dead_code)]

View File

@ -1,113 +1,113 @@
error: attempt to shift left with overflow
--> $DIR/lint-exceeding-bitshifts.rs:7:15
--> $DIR/lint-exceeding-bitshifts.rs:9:15
|
LL | let n = 1u8 << 8;
| ^^^^^^^^
|
note: lint level defined here
--> $DIR/lint-exceeding-bitshifts.rs:1:9
--> $DIR/lint-exceeding-bitshifts.rs:3:9
|
LL | #![deny(exceeding_bitshifts, const_err)]
| ^^^^^^^^^^^^^^^^^^^
error: attempt to shift left with overflow
--> $DIR/lint-exceeding-bitshifts.rs:9:15
--> $DIR/lint-exceeding-bitshifts.rs:11:15
|
LL | let n = 1u16 << 16;
| ^^^^^^^^^^
error: attempt to shift left with overflow
--> $DIR/lint-exceeding-bitshifts.rs:11:15
--> $DIR/lint-exceeding-bitshifts.rs:13:15
|
LL | let n = 1u32 << 32;
| ^^^^^^^^^^
error: attempt to shift left with overflow
--> $DIR/lint-exceeding-bitshifts.rs:13:15
--> $DIR/lint-exceeding-bitshifts.rs:15:15
|
LL | let n = 1u64 << 64;
| ^^^^^^^^^^
error: attempt to shift left with overflow
--> $DIR/lint-exceeding-bitshifts.rs:15:15
--> $DIR/lint-exceeding-bitshifts.rs:17:15
|
LL | let n = 1i8 << 8;
| ^^^^^^^^
error: attempt to shift left with overflow
--> $DIR/lint-exceeding-bitshifts.rs:17:15
--> $DIR/lint-exceeding-bitshifts.rs:19:15
|
LL | let n = 1i16 << 16;
| ^^^^^^^^^^
error: attempt to shift left with overflow
--> $DIR/lint-exceeding-bitshifts.rs:19:15
--> $DIR/lint-exceeding-bitshifts.rs:21:15
|
LL | let n = 1i32 << 32;
| ^^^^^^^^^^
error: attempt to shift left with overflow
--> $DIR/lint-exceeding-bitshifts.rs:21:15
--> $DIR/lint-exceeding-bitshifts.rs:23:15
|
LL | let n = 1i64 << 64;
| ^^^^^^^^^^
error: attempt to shift right with overflow
--> $DIR/lint-exceeding-bitshifts.rs:24:15
--> $DIR/lint-exceeding-bitshifts.rs:26:15
|
LL | let n = 1u8 >> 8;
| ^^^^^^^^
error: attempt to shift right with overflow
--> $DIR/lint-exceeding-bitshifts.rs:26:15
--> $DIR/lint-exceeding-bitshifts.rs:28:15
|
LL | let n = 1u16 >> 16;
| ^^^^^^^^^^
error: attempt to shift right with overflow
--> $DIR/lint-exceeding-bitshifts.rs:28:15
--> $DIR/lint-exceeding-bitshifts.rs:30:15
|
LL | let n = 1u32 >> 32;
| ^^^^^^^^^^
error: attempt to shift right with overflow
--> $DIR/lint-exceeding-bitshifts.rs:30:15
--> $DIR/lint-exceeding-bitshifts.rs:32:15
|
LL | let n = 1u64 >> 64;
| ^^^^^^^^^^
error: attempt to shift right with overflow
--> $DIR/lint-exceeding-bitshifts.rs:32:15
--> $DIR/lint-exceeding-bitshifts.rs:34:15
|
LL | let n = 1i8 >> 8;
| ^^^^^^^^
error: attempt to shift right with overflow
--> $DIR/lint-exceeding-bitshifts.rs:34:15
--> $DIR/lint-exceeding-bitshifts.rs:36:15
|
LL | let n = 1i16 >> 16;
| ^^^^^^^^^^
error: attempt to shift right with overflow
--> $DIR/lint-exceeding-bitshifts.rs:36:15
--> $DIR/lint-exceeding-bitshifts.rs:38:15
|
LL | let n = 1i32 >> 32;
| ^^^^^^^^^^
error: attempt to shift right with overflow
--> $DIR/lint-exceeding-bitshifts.rs:38:15
--> $DIR/lint-exceeding-bitshifts.rs:40:15
|
LL | let n = 1i64 >> 64;
| ^^^^^^^^^^
error: attempt to shift left with overflow
--> $DIR/lint-exceeding-bitshifts.rs:42:15
--> $DIR/lint-exceeding-bitshifts.rs:44:15
|
LL | let n = n << 8;
| ^^^^^^
error: attempt to shift left with overflow
--> $DIR/lint-exceeding-bitshifts.rs:44:15
--> $DIR/lint-exceeding-bitshifts.rs:46:15
|
LL | let n = 1u8 << -8;
| ^^^^^^^^^

View File

@ -1,3 +1,5 @@
// compile-flags: -O
#![deny(exceeding_bitshifts, const_err)]
#![allow(unused_variables)]
#![allow(dead_code)]

View File

@ -1,23 +1,23 @@
error: attempt to shift left with overflow
--> $DIR/lint-exceeding-bitshifts2.rs:7:15
--> $DIR/lint-exceeding-bitshifts2.rs:9:15
|
LL | let n = 1u8 << (4+4);
| ^^^^^^^^^^^^
|
note: lint level defined here
--> $DIR/lint-exceeding-bitshifts2.rs:1:9
--> $DIR/lint-exceeding-bitshifts2.rs:3:9
|
LL | #![deny(exceeding_bitshifts, const_err)]
| ^^^^^^^^^^^^^^^^^^^
error: attempt to shift left with overflow
--> $DIR/lint-exceeding-bitshifts2.rs:15:15
--> $DIR/lint-exceeding-bitshifts2.rs:17:15
|
LL | let n = 1_isize << BITS;
| ^^^^^^^^^^^^^^^
error: attempt to shift left with overflow
--> $DIR/lint-exceeding-bitshifts2.rs:16:15
--> $DIR/lint-exceeding-bitshifts2.rs:18:15
|
LL | let n = 1_usize << BITS;
| ^^^^^^^^^^^^^^^