Skip to content

Commit

Permalink
Fix lint-exceeding-bitshifts ui tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wesleywiser committed Sep 28, 2019
1 parent a99f255 commit ba2d6c4
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 23 deletions.
2 changes: 2 additions & 0 deletions src/test/ui/lint/lint-exceeding-bitshifts.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// compile-flags: -O

#![deny(exceeding_bitshifts, const_err)]
#![allow(unused_variables)]
#![allow(dead_code)]
Expand Down
38 changes: 19 additions & 19 deletions src/test/ui/lint/lint-exceeding-bitshifts.stderr
Original file line number Diff line number Diff line change
@@ -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;
| ^^^^^^^^^
Expand Down
2 changes: 2 additions & 0 deletions src/test/ui/lint/lint-exceeding-bitshifts2.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// compile-flags: -O

#![deny(exceeding_bitshifts, const_err)]
#![allow(unused_variables)]
#![allow(dead_code)]
Expand Down
8 changes: 4 additions & 4 deletions src/test/ui/lint/lint-exceeding-bitshifts2.stderr
Original file line number Diff line number Diff line change
@@ -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;
| ^^^^^^^^^^^^^^^
Expand Down

0 comments on commit ba2d6c4

Please sign in to comment.