|
1 |
| -error: this arithmetic operation will overflow |
2 |
| - --> $DIR/lint-exceeding-bitshifts.rs:22:13 |
| 1 | +warning: this arithmetic operation will overflow |
| 2 | + --> $DIR/lint-exceeding-bitshifts.rs:17:20 |
3 | 3 | |
|
4 |
| -LL | let _ = x << 42; |
5 |
| - | ^^^^^^^ attempt to shift left with overflow |
| 4 | +LL | const N: i32 = T::N << 42; |
| 5 | + | ^^^^^^^^^^ attempt to shift left with overflow |
6 | 6 | |
|
7 | 7 | note: the lint level is defined here
|
8 |
| - --> $DIR/lint-exceeding-bitshifts.rs:9:9 |
| 8 | + --> $DIR/lint-exceeding-bitshifts.rs:8:9 |
9 | 9 | |
|
10 |
| -LL | #![deny(arithmetic_overflow, const_err)] |
| 10 | +LL | #![warn(arithmetic_overflow, const_err)] |
11 | 11 | | ^^^^^^^^^^^^^^^^^^^
|
12 | 12 |
|
13 |
| -error: this arithmetic operation will overflow |
14 |
| - --> $DIR/lint-exceeding-bitshifts.rs:27:15 |
| 13 | +warning: this arithmetic operation will overflow |
| 14 | + --> $DIR/lint-exceeding-bitshifts.rs:21:13 |
| 15 | + | |
| 16 | +LL | let _ = x << 42; |
| 17 | + | ^^^^^^^ attempt to shift left with overflow |
| 18 | + |
| 19 | +warning: this arithmetic operation will overflow |
| 20 | + --> $DIR/lint-exceeding-bitshifts.rs:26:15 |
15 | 21 | |
|
16 | 22 | LL | let n = 1u8 << 8;
|
17 | 23 | | ^^^^^^^^ attempt to shift left with overflow
|
18 | 24 |
|
19 |
| -error: this arithmetic operation will overflow |
20 |
| - --> $DIR/lint-exceeding-bitshifts.rs:29:15 |
| 25 | +warning: this arithmetic operation will overflow |
| 26 | + --> $DIR/lint-exceeding-bitshifts.rs:28:15 |
21 | 27 | |
|
22 | 28 | LL | let n = 1u16 << 16;
|
23 | 29 | | ^^^^^^^^^^ attempt to shift left with overflow
|
24 | 30 |
|
25 |
| -error: this arithmetic operation will overflow |
26 |
| - --> $DIR/lint-exceeding-bitshifts.rs:31:15 |
| 31 | +warning: this arithmetic operation will overflow |
| 32 | + --> $DIR/lint-exceeding-bitshifts.rs:30:15 |
27 | 33 | |
|
28 | 34 | LL | let n = 1u32 << 32;
|
29 | 35 | | ^^^^^^^^^^ attempt to shift left with overflow
|
30 | 36 |
|
31 |
| -error: this arithmetic operation will overflow |
32 |
| - --> $DIR/lint-exceeding-bitshifts.rs:33:15 |
| 37 | +warning: this arithmetic operation will overflow |
| 38 | + --> $DIR/lint-exceeding-bitshifts.rs:32:15 |
33 | 39 | |
|
34 | 40 | LL | let n = 1u64 << 64;
|
35 | 41 | | ^^^^^^^^^^ attempt to shift left with overflow
|
36 | 42 |
|
37 |
| -error: this arithmetic operation will overflow |
38 |
| - --> $DIR/lint-exceeding-bitshifts.rs:35:15 |
| 43 | +warning: this arithmetic operation will overflow |
| 44 | + --> $DIR/lint-exceeding-bitshifts.rs:34:15 |
39 | 45 | |
|
40 | 46 | LL | let n = 1i8 << 8;
|
41 | 47 | | ^^^^^^^^ attempt to shift left with overflow
|
42 | 48 |
|
43 |
| -error: this arithmetic operation will overflow |
44 |
| - --> $DIR/lint-exceeding-bitshifts.rs:37:15 |
| 49 | +warning: this arithmetic operation will overflow |
| 50 | + --> $DIR/lint-exceeding-bitshifts.rs:36:15 |
45 | 51 | |
|
46 | 52 | LL | let n = 1i16 << 16;
|
47 | 53 | | ^^^^^^^^^^ attempt to shift left with overflow
|
48 | 54 |
|
49 |
| -error: this arithmetic operation will overflow |
50 |
| - --> $DIR/lint-exceeding-bitshifts.rs:39:15 |
| 55 | +warning: this arithmetic operation will overflow |
| 56 | + --> $DIR/lint-exceeding-bitshifts.rs:38:15 |
51 | 57 | |
|
52 | 58 | LL | let n = 1i32 << 32;
|
53 | 59 | | ^^^^^^^^^^ attempt to shift left with overflow
|
54 | 60 |
|
55 |
| -error: this arithmetic operation will overflow |
56 |
| - --> $DIR/lint-exceeding-bitshifts.rs:41:15 |
| 61 | +warning: this arithmetic operation will overflow |
| 62 | + --> $DIR/lint-exceeding-bitshifts.rs:40:15 |
57 | 63 | |
|
58 | 64 | LL | let n = 1i64 << 64;
|
59 | 65 | | ^^^^^^^^^^ attempt to shift left with overflow
|
60 | 66 |
|
61 |
| -error: this arithmetic operation will overflow |
62 |
| - --> $DIR/lint-exceeding-bitshifts.rs:44:15 |
| 67 | +warning: this arithmetic operation will overflow |
| 68 | + --> $DIR/lint-exceeding-bitshifts.rs:43:15 |
63 | 69 | |
|
64 | 70 | LL | let n = 1u8 >> 8;
|
65 | 71 | | ^^^^^^^^ attempt to shift right with overflow
|
66 | 72 |
|
67 |
| -error: this arithmetic operation will overflow |
68 |
| - --> $DIR/lint-exceeding-bitshifts.rs:46:15 |
| 73 | +warning: this arithmetic operation will overflow |
| 74 | + --> $DIR/lint-exceeding-bitshifts.rs:45:15 |
69 | 75 | |
|
70 | 76 | LL | let n = 1u16 >> 16;
|
71 | 77 | | ^^^^^^^^^^ attempt to shift right with overflow
|
72 | 78 |
|
73 |
| -error: this arithmetic operation will overflow |
74 |
| - --> $DIR/lint-exceeding-bitshifts.rs:48:15 |
| 79 | +warning: this arithmetic operation will overflow |
| 80 | + --> $DIR/lint-exceeding-bitshifts.rs:47:15 |
75 | 81 | |
|
76 | 82 | LL | let n = 1u32 >> 32;
|
77 | 83 | | ^^^^^^^^^^ attempt to shift right with overflow
|
78 | 84 |
|
79 |
| -error: this arithmetic operation will overflow |
80 |
| - --> $DIR/lint-exceeding-bitshifts.rs:50:15 |
| 85 | +warning: this arithmetic operation will overflow |
| 86 | + --> $DIR/lint-exceeding-bitshifts.rs:49:15 |
81 | 87 | |
|
82 | 88 | LL | let n = 1u64 >> 64;
|
83 | 89 | | ^^^^^^^^^^ attempt to shift right with overflow
|
84 | 90 |
|
85 |
| -error: this arithmetic operation will overflow |
86 |
| - --> $DIR/lint-exceeding-bitshifts.rs:52:15 |
| 91 | +warning: this arithmetic operation will overflow |
| 92 | + --> $DIR/lint-exceeding-bitshifts.rs:51:15 |
87 | 93 | |
|
88 | 94 | LL | let n = 1i8 >> 8;
|
89 | 95 | | ^^^^^^^^ attempt to shift right with overflow
|
90 | 96 |
|
91 |
| -error: this arithmetic operation will overflow |
92 |
| - --> $DIR/lint-exceeding-bitshifts.rs:54:15 |
| 97 | +warning: this arithmetic operation will overflow |
| 98 | + --> $DIR/lint-exceeding-bitshifts.rs:53:15 |
93 | 99 | |
|
94 | 100 | LL | let n = 1i16 >> 16;
|
95 | 101 | | ^^^^^^^^^^ attempt to shift right with overflow
|
96 | 102 |
|
97 |
| -error: this arithmetic operation will overflow |
98 |
| - --> $DIR/lint-exceeding-bitshifts.rs:56:15 |
| 103 | +warning: this arithmetic operation will overflow |
| 104 | + --> $DIR/lint-exceeding-bitshifts.rs:55:15 |
99 | 105 | |
|
100 | 106 | LL | let n = 1i32 >> 32;
|
101 | 107 | | ^^^^^^^^^^ attempt to shift right with overflow
|
102 | 108 |
|
103 |
| -error: this arithmetic operation will overflow |
104 |
| - --> $DIR/lint-exceeding-bitshifts.rs:58:15 |
| 109 | +warning: this arithmetic operation will overflow |
| 110 | + --> $DIR/lint-exceeding-bitshifts.rs:57:15 |
105 | 111 | |
|
106 | 112 | LL | let n = 1i64 >> 64;
|
107 | 113 | | ^^^^^^^^^^ attempt to shift right with overflow
|
108 | 114 |
|
109 |
| -error: this arithmetic operation will overflow |
110 |
| - --> $DIR/lint-exceeding-bitshifts.rs:62:15 |
| 115 | +warning: this arithmetic operation will overflow |
| 116 | + --> $DIR/lint-exceeding-bitshifts.rs:61:15 |
111 | 117 | |
|
112 | 118 | LL | let n = n << 8;
|
113 | 119 | | ^^^^^^ attempt to shift left with overflow
|
114 | 120 |
|
115 |
| -error: this arithmetic operation will overflow |
116 |
| - --> $DIR/lint-exceeding-bitshifts.rs:64:15 |
| 121 | +warning: this arithmetic operation will overflow |
| 122 | + --> $DIR/lint-exceeding-bitshifts.rs:63:15 |
117 | 123 | |
|
118 | 124 | LL | let n = 1u8 << -8;
|
119 | 125 | | ^^^^^^^^^ attempt to shift left with overflow
|
120 | 126 |
|
121 |
| -error: this arithmetic operation will overflow |
122 |
| - --> $DIR/lint-exceeding-bitshifts.rs:69:15 |
| 127 | +warning: this arithmetic operation will overflow |
| 128 | + --> $DIR/lint-exceeding-bitshifts.rs:68:15 |
123 | 129 | |
|
124 | 130 | LL | let n = 1u8 << (4+4);
|
125 | 131 | | ^^^^^^^^^^^^ attempt to shift left with overflow
|
126 | 132 |
|
127 |
| -error: this arithmetic operation will overflow |
128 |
| - --> $DIR/lint-exceeding-bitshifts.rs:71:15 |
| 133 | +warning: this arithmetic operation will overflow |
| 134 | + --> $DIR/lint-exceeding-bitshifts.rs:70:15 |
129 | 135 | |
|
130 | 136 | LL | let n = 1i64 >> [64][0];
|
131 | 137 | | ^^^^^^^^^^^^^^^ attempt to shift right with overflow
|
132 | 138 |
|
133 |
| -error: this arithmetic operation will overflow |
134 |
| - --> $DIR/lint-exceeding-bitshifts.rs:77:15 |
| 139 | +warning: this arithmetic operation will overflow |
| 140 | + --> $DIR/lint-exceeding-bitshifts.rs:76:15 |
135 | 141 | |
|
136 | 142 | LL | let n = 1_isize << BITS;
|
137 | 143 | | ^^^^^^^^^^^^^^^ attempt to shift left with overflow
|
138 | 144 |
|
139 |
| -error: this arithmetic operation will overflow |
140 |
| - --> $DIR/lint-exceeding-bitshifts.rs:78:15 |
| 145 | +warning: this arithmetic operation will overflow |
| 146 | + --> $DIR/lint-exceeding-bitshifts.rs:77:15 |
141 | 147 | |
|
142 | 148 | LL | let n = 1_usize << BITS;
|
143 | 149 | | ^^^^^^^^^^^^^^^ attempt to shift left with overflow
|
144 | 150 |
|
145 |
| -error: aborting due to 23 previous errors |
| 151 | +warning: 24 warnings emitted |
146 | 152 |
|
0 commit comments