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