1 error: this operation has no effect
2 --> $DIR/identity_op.rs:43:5
5 | ^^^^^ help: consider reducing it to: `x`
7 = note: `-D clippy::identity-op` implied by `-D warnings`
9 error: this operation has no effect
10 --> $DIR/identity_op.rs:44:5
13 | ^^^^^^^^^^^ help: consider reducing it to: `x`
15 error: this operation has no effect
16 --> $DIR/identity_op.rs:46:5
19 | ^^^^^ help: consider reducing it to: `x`
21 error: this operation has no effect
22 --> $DIR/identity_op.rs:49:5
25 | ^^^^^^^ help: consider reducing it to: `x`
27 error: this operation has no effect
28 --> $DIR/identity_op.rs:52:5
31 | ^^^^^ help: consider reducing it to: `x`
33 error: this operation has no effect
34 --> $DIR/identity_op.rs:53:5
37 | ^^^^^ help: consider reducing it to: `x`
39 error: this operation has no effect
40 --> $DIR/identity_op.rs:59:5
43 | ^^^^^^ help: consider reducing it to: `x`
45 error: this operation has no effect
46 --> $DIR/identity_op.rs:62:5
49 | ^^^^^^^ help: consider reducing it to: `u`
51 error: this operation has no effect
52 --> $DIR/identity_op.rs:65:5
55 | ^^^^^^^ help: consider reducing it to: `42`
57 error: this operation has no effect
58 --> $DIR/identity_op.rs:66:5
61 | ^^^^^^ help: consider reducing it to: `1`
63 error: this operation has no effect
64 --> $DIR/identity_op.rs:67:5
67 | ^^^^^^^ help: consider reducing it to: `42`
69 error: this operation has no effect
70 --> $DIR/identity_op.rs:68:5
73 | ^^^^^^^ help: consider reducing it to: `x`
75 error: this operation has no effect
76 --> $DIR/identity_op.rs:69:5
79 | ^^^^^^^ help: consider reducing it to: `x`
81 error: this operation has no effect
82 --> $DIR/identity_op.rs:76:5
85 | ^^^^^ help: consider reducing it to: `2`
87 error: this operation has no effect
88 --> $DIR/identity_op.rs:77:5
91 | ^^^^^^ help: consider reducing it to: `-2`
93 error: this operation has no effect
94 --> $DIR/identity_op.rs:78:5
97 | ^^^^^^ help: consider reducing it to: `2`
99 error: this operation has no effect
100 --> $DIR/identity_op.rs:79:5
103 | ^^^^^^^ help: consider reducing it to: `-2`
105 error: this operation has no effect
106 --> $DIR/identity_op.rs:80:9
109 | ^^^^^ help: consider reducing it to: `1`
111 error: this operation has no effect
112 --> $DIR/identity_op.rs:88:5
114 LL | 0 + if b { 1 } else { 2 };
115 | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(if b { 1 } else { 2 })`
117 error: this operation has no effect
118 --> $DIR/identity_op.rs:89:5
120 LL | 0 + if b { 1 } else { 2 } + if b { 3 } else { 4 };
121 | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(if b { 1 } else { 2 })`
123 error: this operation has no effect
124 --> $DIR/identity_op.rs:90:5
126 LL | 0 + match a { 0 => 10, _ => 20 };
127 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(match a { 0 => 10, _ => 20 })`
129 error: this operation has no effect
130 --> $DIR/identity_op.rs:91:5
132 LL | 0 + match a { 0 => 10, _ => 20 } + match a { 0 => 30, _ => 40 };
133 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(match a { 0 => 10, _ => 20 })`
135 error: this operation has no effect
136 --> $DIR/identity_op.rs:92:5
138 LL | 0 + if b { 1 } else { 2 } + match a { 0 => 30, _ => 40 };
139 | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(if b { 1 } else { 2 })`
141 error: this operation has no effect
142 --> $DIR/identity_op.rs:93:5
144 LL | 0 + match a { 0 => 10, _ => 20 } + if b { 3 } else { 4 };
145 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(match a { 0 => 10, _ => 20 })`
147 error: this operation has no effect
148 --> $DIR/identity_op.rs:94:5
150 LL | (if b { 1 } else { 2 }) + 0;
151 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(if b { 1 } else { 2 })`
153 error: this operation has no effect
154 --> $DIR/identity_op.rs:96:5
157 | ^^^^^^^^^ help: consider reducing it to: `({ a })`
159 error: this operation has no effect
160 --> $DIR/identity_op.rs:97:5
163 | ^^^^^^^^^^^^^ help: consider reducing it to: `({ a } * 2)`
165 error: this operation has no effect
166 --> $DIR/identity_op.rs:98:5
168 LL | 0 + loop { let mut c = 0; if c == 10 { break c; } c += 1; } + { a * 2 };
169 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(loop { let mut c = 0; if c == 10 { break c; } c += 1; })`
171 error: this operation has no effect
172 --> $DIR/identity_op.rs:103:7
174 LL | f(1 * a + { 8 * 5 });
175 | ^^^^^ help: consider reducing it to: `a`
177 error: this operation has no effect
178 --> $DIR/identity_op.rs:104:7
180 LL | f(0 + if b { 1 } else { 2 } + 3);
181 | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `if b { 1 } else { 2 }`
183 error: this operation has no effect
184 --> $DIR/identity_op.rs:105:20
186 LL | const _: i32 = { 2 * 4 } + 0 + 3;
187 | ^^^^^^^^^^^^^ help: consider reducing it to: `{ 2 * 4 }`
189 error: this operation has no effect
190 --> $DIR/identity_op.rs:106:20
192 LL | const _: i32 = 0 + { 1 + 2 * 3 } + 3;
193 | ^^^^^^^^^^^^^^^^^ help: consider reducing it to: `{ 1 + 2 * 3 }`
195 error: this operation has no effect
196 --> $DIR/identity_op.rs:108:5
199 | ^^^^^^^^^^^^^^ help: consider reducing it to: `a as usize`
201 error: this operation has no effect
202 --> $DIR/identity_op.rs:109:13
204 LL | let _ = 0 + a as usize;
205 | ^^^^^^^^^^^^^^ help: consider reducing it to: `a as usize`
207 error: this operation has no effect
208 --> $DIR/identity_op.rs:110:5
210 LL | 0 + { a } as usize;
211 | ^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `({ a } as usize)`
213 error: this operation has no effect
214 --> $DIR/identity_op.rs:112:9
216 LL | 2 * (0 + { a });
217 | ^^^^^^^^^^^ help: consider reducing it to: `{ a }`
219 error: this operation has no effect
220 --> $DIR/identity_op.rs:113:5
222 LL | 1 * ({ a } + 4);
223 | ^^^^^^^^^^^^^^^ help: consider reducing it to: `(({ a } + 4))`
225 error: this operation has no effect
226 --> $DIR/identity_op.rs:114:5
229 | ^^^^^ help: consider reducing it to: `1`
231 error: this operation has no effect
232 --> $DIR/identity_op.rs:118:18
234 LL | let _: i32 = &x + 0;
235 | ^^^^^^ help: consider reducing it to: `x`
237 error: this operation has no effect
238 --> $DIR/identity_op.rs:122:5
240 LL | 0 + if a { 1 } else { 2 } + if b { 3 } else { 5 }
241 | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(if a { 1 } else { 2 })`
243 error: aborting due to 40 previous errors