1 error: this arithmetic operation will overflow
2 --> $DIR/lint-exceeding-bitshifts.rs:22:13
5 | ^^^^^^^ attempt to shift left with overflow
7 note: the lint level is defined here
8 --> $DIR/lint-exceeding-bitshifts.rs:9:9
10 LL | #![deny(arithmetic_overflow, const_err)]
13 error: this arithmetic operation will overflow
14 --> $DIR/lint-exceeding-bitshifts.rs:27:15
16 LL | let n = 1u8 << 8;
17 | ^^^^^^^^ attempt to shift left with overflow
19 error: this arithmetic operation will overflow
20 --> $DIR/lint-exceeding-bitshifts.rs:29:15
22 LL | let n = 1u16 << 16;
23 | ^^^^^^^^^^ attempt to shift left with overflow
25 error: this arithmetic operation will overflow
26 --> $DIR/lint-exceeding-bitshifts.rs:31:15
28 LL | let n = 1u32 << 32;
29 | ^^^^^^^^^^ attempt to shift left with overflow
31 error: this arithmetic operation will overflow
32 --> $DIR/lint-exceeding-bitshifts.rs:33:15
34 LL | let n = 1u64 << 64;
35 | ^^^^^^^^^^ attempt to shift left with overflow
37 error: this arithmetic operation will overflow
38 --> $DIR/lint-exceeding-bitshifts.rs:35:15
40 LL | let n = 1i8 << 8;
41 | ^^^^^^^^ attempt to shift left with overflow
43 error: this arithmetic operation will overflow
44 --> $DIR/lint-exceeding-bitshifts.rs:37:15
46 LL | let n = 1i16 << 16;
47 | ^^^^^^^^^^ attempt to shift left with overflow
49 error: this arithmetic operation will overflow
50 --> $DIR/lint-exceeding-bitshifts.rs:39:15
52 LL | let n = 1i32 << 32;
53 | ^^^^^^^^^^ attempt to shift left with overflow
55 error: this arithmetic operation will overflow
56 --> $DIR/lint-exceeding-bitshifts.rs:41:15
58 LL | let n = 1i64 << 64;
59 | ^^^^^^^^^^ attempt to shift left with overflow
61 error: this arithmetic operation will overflow
62 --> $DIR/lint-exceeding-bitshifts.rs:44:15
64 LL | let n = 1u8 >> 8;
65 | ^^^^^^^^ attempt to shift right with overflow
67 error: this arithmetic operation will overflow
68 --> $DIR/lint-exceeding-bitshifts.rs:46:15
70 LL | let n = 1u16 >> 16;
71 | ^^^^^^^^^^ attempt to shift right with overflow
73 error: this arithmetic operation will overflow
74 --> $DIR/lint-exceeding-bitshifts.rs:48:15
76 LL | let n = 1u32 >> 32;
77 | ^^^^^^^^^^ attempt to shift right with overflow
79 error: this arithmetic operation will overflow
80 --> $DIR/lint-exceeding-bitshifts.rs:50:15
82 LL | let n = 1u64 >> 64;
83 | ^^^^^^^^^^ attempt to shift right with overflow
85 error: this arithmetic operation will overflow
86 --> $DIR/lint-exceeding-bitshifts.rs:52:15
88 LL | let n = 1i8 >> 8;
89 | ^^^^^^^^ attempt to shift right with overflow
91 error: this arithmetic operation will overflow
92 --> $DIR/lint-exceeding-bitshifts.rs:54:15
94 LL | let n = 1i16 >> 16;
95 | ^^^^^^^^^^ attempt to shift right with overflow
97 error: this arithmetic operation will overflow
98 --> $DIR/lint-exceeding-bitshifts.rs:56:15
100 LL | let n = 1i32 >> 32;
101 | ^^^^^^^^^^ attempt to shift right with overflow
103 error: this arithmetic operation will overflow
104 --> $DIR/lint-exceeding-bitshifts.rs:58:15
106 LL | let n = 1i64 >> 64;
107 | ^^^^^^^^^^ attempt to shift right with overflow
109 error: this arithmetic operation will overflow
110 --> $DIR/lint-exceeding-bitshifts.rs:62:15
113 | ^^^^^^ attempt to shift left with overflow
115 error: this arithmetic operation will overflow
116 --> $DIR/lint-exceeding-bitshifts.rs:64:15
118 LL | let n = 1u8 << -8;
119 | ^^^^^^^^^ attempt to shift left with overflow
121 error: this arithmetic operation will overflow
122 --> $DIR/lint-exceeding-bitshifts.rs:69:15
124 LL | let n = 1u8 << (4+4);
125 | ^^^^^^^^^^^^ attempt to shift left with overflow
127 error: this arithmetic operation will overflow
128 --> $DIR/lint-exceeding-bitshifts.rs:71:15
130 LL | let n = 1i64 >> [64][0];
131 | ^^^^^^^^^^^^^^^ attempt to shift right with overflow
133 error: this arithmetic operation will overflow
134 --> $DIR/lint-exceeding-bitshifts.rs:77:15
136 LL | let n = 1_isize << BITS;
137 | ^^^^^^^^^^^^^^^ attempt to shift left with overflow
139 error: this arithmetic operation will overflow
140 --> $DIR/lint-exceeding-bitshifts.rs:78:15
142 LL | let n = 1_usize << BITS;
143 | ^^^^^^^^^^^^^^^ attempt to shift left with overflow
145 error: aborting due to 23 previous errors