Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit ba2d6c4

Browse files
committedSep 28, 2019
Fix lint-exceeding-bitshifts ui tests
1 parent a99f255 commit ba2d6c4

4 files changed

+27
-23
lines changed
 

‎src/test/ui/lint/lint-exceeding-bitshifts.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// compile-flags: -O
2+
13
#![deny(exceeding_bitshifts, const_err)]
24
#![allow(unused_variables)]
35
#![allow(dead_code)]

‎src/test/ui/lint/lint-exceeding-bitshifts.stderr

+19-19
Original file line numberDiff line numberDiff line change
@@ -1,113 +1,113 @@
11
error: attempt to shift left with overflow
2-
--> $DIR/lint-exceeding-bitshifts.rs:7:15
2+
--> $DIR/lint-exceeding-bitshifts.rs:9:15
33
|
44
LL | let n = 1u8 << 8;
55
| ^^^^^^^^
66
|
77
note: lint level defined here
8-
--> $DIR/lint-exceeding-bitshifts.rs:1:9
8+
--> $DIR/lint-exceeding-bitshifts.rs:3:9
99
|
1010
LL | #![deny(exceeding_bitshifts, const_err)]
1111
| ^^^^^^^^^^^^^^^^^^^
1212

1313
error: attempt to shift left with overflow
14-
--> $DIR/lint-exceeding-bitshifts.rs:9:15
14+
--> $DIR/lint-exceeding-bitshifts.rs:11:15
1515
|
1616
LL | let n = 1u16 << 16;
1717
| ^^^^^^^^^^
1818

1919
error: attempt to shift left with overflow
20-
--> $DIR/lint-exceeding-bitshifts.rs:11:15
20+
--> $DIR/lint-exceeding-bitshifts.rs:13:15
2121
|
2222
LL | let n = 1u32 << 32;
2323
| ^^^^^^^^^^
2424

2525
error: attempt to shift left with overflow
26-
--> $DIR/lint-exceeding-bitshifts.rs:13:15
26+
--> $DIR/lint-exceeding-bitshifts.rs:15:15
2727
|
2828
LL | let n = 1u64 << 64;
2929
| ^^^^^^^^^^
3030

3131
error: attempt to shift left with overflow
32-
--> $DIR/lint-exceeding-bitshifts.rs:15:15
32+
--> $DIR/lint-exceeding-bitshifts.rs:17:15
3333
|
3434
LL | let n = 1i8 << 8;
3535
| ^^^^^^^^
3636

3737
error: attempt to shift left with overflow
38-
--> $DIR/lint-exceeding-bitshifts.rs:17:15
38+
--> $DIR/lint-exceeding-bitshifts.rs:19:15
3939
|
4040
LL | let n = 1i16 << 16;
4141
| ^^^^^^^^^^
4242

4343
error: attempt to shift left with overflow
44-
--> $DIR/lint-exceeding-bitshifts.rs:19:15
44+
--> $DIR/lint-exceeding-bitshifts.rs:21:15
4545
|
4646
LL | let n = 1i32 << 32;
4747
| ^^^^^^^^^^
4848

4949
error: attempt to shift left with overflow
50-
--> $DIR/lint-exceeding-bitshifts.rs:21:15
50+
--> $DIR/lint-exceeding-bitshifts.rs:23:15
5151
|
5252
LL | let n = 1i64 << 64;
5353
| ^^^^^^^^^^
5454

5555
error: attempt to shift right with overflow
56-
--> $DIR/lint-exceeding-bitshifts.rs:24:15
56+
--> $DIR/lint-exceeding-bitshifts.rs:26:15
5757
|
5858
LL | let n = 1u8 >> 8;
5959
| ^^^^^^^^
6060

6161
error: attempt to shift right with overflow
62-
--> $DIR/lint-exceeding-bitshifts.rs:26:15
62+
--> $DIR/lint-exceeding-bitshifts.rs:28:15
6363
|
6464
LL | let n = 1u16 >> 16;
6565
| ^^^^^^^^^^
6666

6767
error: attempt to shift right with overflow
68-
--> $DIR/lint-exceeding-bitshifts.rs:28:15
68+
--> $DIR/lint-exceeding-bitshifts.rs:30:15
6969
|
7070
LL | let n = 1u32 >> 32;
7171
| ^^^^^^^^^^
7272

7373
error: attempt to shift right with overflow
74-
--> $DIR/lint-exceeding-bitshifts.rs:30:15
74+
--> $DIR/lint-exceeding-bitshifts.rs:32:15
7575
|
7676
LL | let n = 1u64 >> 64;
7777
| ^^^^^^^^^^
7878

7979
error: attempt to shift right with overflow
80-
--> $DIR/lint-exceeding-bitshifts.rs:32:15
80+
--> $DIR/lint-exceeding-bitshifts.rs:34:15
8181
|
8282
LL | let n = 1i8 >> 8;
8383
| ^^^^^^^^
8484

8585
error: attempt to shift right with overflow
86-
--> $DIR/lint-exceeding-bitshifts.rs:34:15
86+
--> $DIR/lint-exceeding-bitshifts.rs:36:15
8787
|
8888
LL | let n = 1i16 >> 16;
8989
| ^^^^^^^^^^
9090

9191
error: attempt to shift right with overflow
92-
--> $DIR/lint-exceeding-bitshifts.rs:36:15
92+
--> $DIR/lint-exceeding-bitshifts.rs:38:15
9393
|
9494
LL | let n = 1i32 >> 32;
9595
| ^^^^^^^^^^
9696

9797
error: attempt to shift right with overflow
98-
--> $DIR/lint-exceeding-bitshifts.rs:38:15
98+
--> $DIR/lint-exceeding-bitshifts.rs:40:15
9999
|
100100
LL | let n = 1i64 >> 64;
101101
| ^^^^^^^^^^
102102

103103
error: attempt to shift left with overflow
104-
--> $DIR/lint-exceeding-bitshifts.rs:42:15
104+
--> $DIR/lint-exceeding-bitshifts.rs:44:15
105105
|
106106
LL | let n = n << 8;
107107
| ^^^^^^
108108

109109
error: attempt to shift left with overflow
110-
--> $DIR/lint-exceeding-bitshifts.rs:44:15
110+
--> $DIR/lint-exceeding-bitshifts.rs:46:15
111111
|
112112
LL | let n = 1u8 << -8;
113113
| ^^^^^^^^^

‎src/test/ui/lint/lint-exceeding-bitshifts2.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// compile-flags: -O
2+
13
#![deny(exceeding_bitshifts, const_err)]
24
#![allow(unused_variables)]
35
#![allow(dead_code)]

‎src/test/ui/lint/lint-exceeding-bitshifts2.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
error: attempt to shift left with overflow
2-
--> $DIR/lint-exceeding-bitshifts2.rs:7:15
2+
--> $DIR/lint-exceeding-bitshifts2.rs:9:15
33
|
44
LL | let n = 1u8 << (4+4);
55
| ^^^^^^^^^^^^
66
|
77
note: lint level defined here
8-
--> $DIR/lint-exceeding-bitshifts2.rs:1:9
8+
--> $DIR/lint-exceeding-bitshifts2.rs:3:9
99
|
1010
LL | #![deny(exceeding_bitshifts, const_err)]
1111
| ^^^^^^^^^^^^^^^^^^^
1212

1313
error: attempt to shift left with overflow
14-
--> $DIR/lint-exceeding-bitshifts2.rs:15:15
14+
--> $DIR/lint-exceeding-bitshifts2.rs:17:15
1515
|
1616
LL | let n = 1_isize << BITS;
1717
| ^^^^^^^^^^^^^^^
1818

1919
error: attempt to shift left with overflow
20-
--> $DIR/lint-exceeding-bitshifts2.rs:16:15
20+
--> $DIR/lint-exceeding-bitshifts2.rs:18:15
2121
|
2222
LL | let n = 1_usize << BITS;
2323
| ^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)
Please sign in to comment.