]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/identity_op.stderr
bump version to 1.80.1+dfsg1-1~bpo12+pve1
[rustc.git] / src / tools / clippy / tests / ui / identity_op.stderr
CommitLineData
923072b8 1error: this operation has no effect
c620b35d 2 --> tests/ui/identity_op.rs:44:5
f20569fa
XL
3 |
4LL | x + 0;
923072b8 5 | ^^^^^ help: consider reducing it to: `x`
f20569fa
XL
6 |
7 = note: `-D clippy::identity-op` implied by `-D warnings`
781aab86 8 = help: to override `-D warnings` add `#[allow(clippy::identity_op)]`
f20569fa 9
923072b8 10error: this operation has no effect
c620b35d 11 --> tests/ui/identity_op.rs:46:5
f20569fa
XL
12 |
13LL | x + (1 - 1);
923072b8 14 | ^^^^^^^^^^^ help: consider reducing it to: `x`
f20569fa 15
923072b8 16error: this operation has no effect
c620b35d 17 --> tests/ui/identity_op.rs:49:5
f20569fa
XL
18 |
19LL | 0 + x;
923072b8 20 | ^^^^^ help: consider reducing it to: `x`
f20569fa 21
923072b8 22error: this operation has no effect
c620b35d 23 --> tests/ui/identity_op.rs:53:5
f20569fa
XL
24 |
25LL | x | (0);
923072b8 26 | ^^^^^^^ help: consider reducing it to: `x`
f20569fa 27
923072b8 28error: this operation has no effect
c620b35d 29 --> tests/ui/identity_op.rs:57:5
f20569fa
XL
30 |
31LL | x * 1;
923072b8 32 | ^^^^^ help: consider reducing it to: `x`
f20569fa 33
923072b8 34error: this operation has no effect
c620b35d 35 --> tests/ui/identity_op.rs:59:5
f20569fa
XL
36 |
37LL | 1 * x;
923072b8 38 | ^^^^^ help: consider reducing it to: `x`
f20569fa 39
923072b8 40error: this operation has no effect
c620b35d 41 --> tests/ui/identity_op.rs:66:5
f20569fa
XL
42 |
43LL | -1 & x;
923072b8 44 | ^^^^^^ help: consider reducing it to: `x`
f20569fa 45
923072b8 46error: this operation has no effect
c620b35d 47 --> tests/ui/identity_op.rs:70:5
f20569fa
XL
48 |
49LL | u & 255;
923072b8 50 | ^^^^^^^ help: consider reducing it to: `u`
f20569fa 51
923072b8 52error: this operation has no effect
c620b35d 53 --> tests/ui/identity_op.rs:74:5
f20569fa
XL
54 |
55LL | 42 << 0;
923072b8 56 | ^^^^^^^ help: consider reducing it to: `42`
f20569fa 57
923072b8 58error: this operation has no effect
c620b35d 59 --> tests/ui/identity_op.rs:76:5
f20569fa
XL
60 |
61LL | 1 >> 0;
923072b8 62 | ^^^^^^ help: consider reducing it to: `1`
f20569fa 63
923072b8 64error: this operation has no effect
c620b35d 65 --> tests/ui/identity_op.rs:78:5
f20569fa
XL
66 |
67LL | 42 >> 0;
923072b8 68 | ^^^^^^^ help: consider reducing it to: `42`
f20569fa 69
923072b8 70error: this operation has no effect
c620b35d 71 --> tests/ui/identity_op.rs:80:5
a2a8927a
XL
72 |
73LL | &x >> 0;
9c376795 74 | ^^^^^^^ help: consider reducing it to: `x`
a2a8927a 75
923072b8 76error: this operation has no effect
c620b35d 77 --> tests/ui/identity_op.rs:82:5
a2a8927a
XL
78 |
79LL | x >> &0;
923072b8 80 | ^^^^^^^ help: consider reducing it to: `x`
a2a8927a 81
923072b8 82error: this operation has no effect
c620b35d 83 --> tests/ui/identity_op.rs:90:5
04454e1e
FG
84 |
85LL | 2 % 3;
923072b8 86 | ^^^^^ help: consider reducing it to: `2`
04454e1e 87
923072b8 88error: this operation has no effect
c620b35d 89 --> tests/ui/identity_op.rs:92:5
04454e1e
FG
90 |
91LL | -2 % 3;
923072b8 92 | ^^^^^^ help: consider reducing it to: `-2`
04454e1e 93
923072b8 94error: this operation has no effect
c620b35d 95 --> tests/ui/identity_op.rs:94:5
04454e1e
FG
96 |
97LL | 2 % -3 + x;
923072b8 98 | ^^^^^^ help: consider reducing it to: `2`
04454e1e 99
923072b8 100error: this operation has no effect
c620b35d 101 --> tests/ui/identity_op.rs:96:5
04454e1e
FG
102 |
103LL | -2 % -3 + x;
923072b8 104 | ^^^^^^^ help: consider reducing it to: `-2`
04454e1e 105
923072b8 106error: this operation has no effect
c620b35d 107 --> tests/ui/identity_op.rs:98:9
04454e1e
FG
108 |
109LL | x + 1 % 3;
923072b8 110 | ^^^^^ help: consider reducing it to: `1`
04454e1e 111
923072b8 112error: this operation has no effect
c620b35d 113 --> tests/ui/identity_op.rs:107:5
04454e1e
FG
114 |
115LL | 0 + if b { 1 } else { 2 };
923072b8 116 | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(if b { 1 } else { 2 })`
04454e1e 117
923072b8 118error: this operation has no effect
c620b35d 119 --> tests/ui/identity_op.rs:109:5
923072b8
FG
120 |
121LL | 0 + if b { 1 } else { 2 } + if b { 3 } else { 4 };
122 | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(if b { 1 } else { 2 })`
123
124error: this operation has no effect
c620b35d 125 --> tests/ui/identity_op.rs:111:5
04454e1e
FG
126 |
127LL | 0 + match a { 0 => 10, _ => 20 };
923072b8 128 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(match a { 0 => 10, _ => 20 })`
04454e1e 129
923072b8 130error: this operation has no effect
c620b35d 131 --> tests/ui/identity_op.rs:113:5
04454e1e 132 |
923072b8
FG
133LL | 0 + match a { 0 => 10, _ => 20 } + match a { 0 => 30, _ => 40 };
134 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(match a { 0 => 10, _ => 20 })`
04454e1e 135
923072b8 136error: this operation has no effect
c620b35d 137 --> tests/ui/identity_op.rs:115:5
04454e1e 138 |
923072b8
FG
139LL | 0 + if b { 1 } else { 2 } + match a { 0 => 30, _ => 40 };
140 | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(if b { 1 } else { 2 })`
04454e1e 141
923072b8 142error: this operation has no effect
c620b35d 143 --> tests/ui/identity_op.rs:117:5
923072b8
FG
144 |
145LL | 0 + match a { 0 => 10, _ => 20 } + if b { 3 } else { 4 };
146 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(match a { 0 => 10, _ => 20 })`
147
148error: this operation has no effect
c620b35d 149 --> tests/ui/identity_op.rs:119:5
923072b8
FG
150 |
151LL | (if b { 1 } else { 2 }) + 0;
152 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(if b { 1 } else { 2 })`
153
154error: this operation has no effect
c620b35d 155 --> tests/ui/identity_op.rs:122:5
04454e1e 156 |
923072b8
FG
157LL | 0 + { a } + 3;
158 | ^^^^^^^^^ help: consider reducing it to: `({ a })`
04454e1e 159
923072b8 160error: this operation has no effect
c620b35d 161 --> tests/ui/identity_op.rs:124:5
04454e1e 162 |
923072b8
FG
163LL | 0 + { a } * 2;
164 | ^^^^^^^^^^^^^ help: consider reducing it to: `({ a } * 2)`
04454e1e 165
923072b8 166error: this operation has no effect
c620b35d 167 --> tests/ui/identity_op.rs:126:5
04454e1e 168 |
923072b8
FG
169LL | 0 + loop { let mut c = 0; if c == 10 { break c; } c += 1; } + { a * 2 };
170 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(loop { let mut c = 0; if c == 10 { break c; } c += 1; })`
04454e1e 171
923072b8 172error: this operation has no effect
c620b35d 173 --> tests/ui/identity_op.rs:133:7
04454e1e 174 |
923072b8
FG
175LL | f(1 * a + { 8 * 5 });
176 | ^^^^^ help: consider reducing it to: `a`
04454e1e 177
923072b8 178error: this operation has no effect
c620b35d 179 --> tests/ui/identity_op.rs:135:7
04454e1e 180 |
923072b8
FG
181LL | f(0 + if b { 1 } else { 2 } + 3);
182 | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `if b { 1 } else { 2 }`
04454e1e 183
923072b8 184error: this operation has no effect
c620b35d 185 --> tests/ui/identity_op.rs:138:20
04454e1e 186 |
923072b8
FG
187LL | const _: i32 = { 2 * 4 } + 0 + 3;
188 | ^^^^^^^^^^^^^ help: consider reducing it to: `{ 2 * 4 }`
04454e1e 189
923072b8 190error: this operation has no effect
c620b35d 191 --> tests/ui/identity_op.rs:140:20
04454e1e 192 |
923072b8
FG
193LL | const _: i32 = 0 + { 1 + 2 * 3 } + 3;
194 | ^^^^^^^^^^^^^^^^^ help: consider reducing it to: `{ 1 + 2 * 3 }`
04454e1e 195
923072b8 196error: this operation has no effect
c620b35d 197 --> tests/ui/identity_op.rs:143:5
04454e1e 198 |
923072b8
FG
199LL | 0 + a as usize;
200 | ^^^^^^^^^^^^^^ help: consider reducing it to: `a as usize`
04454e1e 201
923072b8 202error: this operation has no effect
c620b35d 203 --> tests/ui/identity_op.rs:145:13
04454e1e 204 |
923072b8
FG
205LL | let _ = 0 + a as usize;
206 | ^^^^^^^^^^^^^^ help: consider reducing it to: `a as usize`
04454e1e 207
923072b8 208error: this operation has no effect
c620b35d 209 --> tests/ui/identity_op.rs:147:5
04454e1e 210 |
923072b8
FG
211LL | 0 + { a } as usize;
212 | ^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `({ a } as usize)`
04454e1e 213
923072b8 214error: this operation has no effect
c620b35d 215 --> tests/ui/identity_op.rs:150:9
04454e1e 216 |
923072b8
FG
217LL | 2 * (0 + { a });
218 | ^^^^^^^^^^^ help: consider reducing it to: `{ a }`
219
220error: this operation has no effect
c620b35d 221 --> tests/ui/identity_op.rs:152:5
923072b8
FG
222 |
223LL | 1 * ({ a } + 4);
224 | ^^^^^^^^^^^^^^^ help: consider reducing it to: `(({ a } + 4))`
225
226error: this operation has no effect
c620b35d 227 --> tests/ui/identity_op.rs:154:5
923072b8
FG
228 |
229LL | 1 * 1;
230 | ^^^^^ help: consider reducing it to: `1`
231
232error: this operation has no effect
c620b35d 233 --> tests/ui/identity_op.rs:159:18
9c376795
FG
234 |
235LL | let _: i32 = &x + 0;
236 | ^^^^^^ help: consider reducing it to: `x`
237
238error: this operation has no effect
c620b35d 239 --> tests/ui/identity_op.rs:164:5
923072b8
FG
240 |
241LL | 0 + if a { 1 } else { 2 } + if b { 3 } else { 5 }
242 | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(if a { 1 } else { 2 })`
04454e1e 243
c0240ec0 244error: this operation has no effect
c620b35d 245 --> tests/ui/identity_op.rs:175:22
c0240ec0
FG
246 |
247LL | let _: i32 = *x + 0;
248 | ^^^^^^ help: consider reducing it to: `*x`
249
250error: this operation has no effect
c620b35d 251 --> tests/ui/identity_op.rs:177:22
c0240ec0
FG
252 |
253LL | let _: i32 = x + 0;
254 | ^^^^^ help: consider reducing it to: `*x`
255
256error: this operation has no effect
c620b35d 257 --> tests/ui/identity_op.rs:182:22
c0240ec0
FG
258 |
259LL | let _: i32 = **x + 0;
260 | ^^^^^^^ help: consider reducing it to: `**x`
261
262error: this operation has no effect
c620b35d 263 --> tests/ui/identity_op.rs:185:22
c0240ec0
FG
264 |
265LL | let _: i32 = *x + 0;
266 | ^^^^^^ help: consider reducing it to: `**x`
267
268error: this operation has no effect
c620b35d 269 --> tests/ui/identity_op.rs:191:22
c0240ec0
FG
270 |
271LL | let _: i32 = ***x + 0;
272 | ^^^^^^^^ help: consider reducing it to: `***x`
273
274error: this operation has no effect
c620b35d 275 --> tests/ui/identity_op.rs:193:22
c0240ec0
FG
276 |
277LL | let _: i32 = **x + 0;
278 | ^^^^^^^ help: consider reducing it to: `***x`
279
280error: this operation has no effect
c620b35d 281 --> tests/ui/identity_op.rs:196:22
c0240ec0
FG
282 |
283LL | let _: i32 = *&x + 0;
284 | ^^^^^^^ help: consider reducing it to: `*&x`
285
286error: this operation has no effect
c620b35d 287 --> tests/ui/identity_op.rs:198:22
c0240ec0
FG
288 |
289LL | let _: i32 = **&&x + 0;
290 | ^^^^^^^^^ help: consider reducing it to: `**&&x`
291
292error: this operation has no effect
c620b35d 293 --> tests/ui/identity_op.rs:200:22
c0240ec0
FG
294 |
295LL | let _: i32 = *&*&x + 0;
296 | ^^^^^^^^^ help: consider reducing it to: `*&*&x`
297
298error: this operation has no effect
c620b35d 299 --> tests/ui/identity_op.rs:202:22
c0240ec0
FG
300 |
301LL | let _: i32 = **&&*&x + 0;
302 | ^^^^^^^^^^^ help: consider reducing it to: `**&&*&x`
303
304error: this operation has no effect
c620b35d 305 --> tests/ui/identity_op.rs:209:22
c0240ec0
FG
306 |
307LL | let _: i32 = **&&*&x + 0;
308 | ^^^^^^^^^^^ help: consider reducing it to: `***&&*&x`
309
310error: this operation has no effect
c620b35d 311 --> tests/ui/identity_op.rs:211:22
c0240ec0
FG
312 |
313LL | let _: i32 = **&&*&x + 0;
314 | ^^^^^^^^^^^ help: consider reducing it to: `***&&*&x`
315
316error: aborting due to 52 previous errors
f20569fa 317