]>
Commit | Line | Data |
---|---|---|
923072b8 FG |
1 | error: this operation has no effect |
2 | --> $DIR/identity_op.rs:43:5 | |
f20569fa XL |
3 | | |
4 | LL | x + 0; | |
923072b8 | 5 | | ^^^^^ help: consider reducing it to: `x` |
f20569fa XL |
6 | | |
7 | = note: `-D clippy::identity-op` implied by `-D warnings` | |
8 | ||
923072b8 FG |
9 | error: this operation has no effect |
10 | --> $DIR/identity_op.rs:44:5 | |
f20569fa XL |
11 | | |
12 | LL | x + (1 - 1); | |
923072b8 | 13 | | ^^^^^^^^^^^ help: consider reducing it to: `x` |
f20569fa | 14 | |
923072b8 FG |
15 | error: this operation has no effect |
16 | --> $DIR/identity_op.rs:46:5 | |
f20569fa XL |
17 | | |
18 | LL | 0 + x; | |
923072b8 | 19 | | ^^^^^ help: consider reducing it to: `x` |
f20569fa | 20 | |
923072b8 FG |
21 | error: this operation has no effect |
22 | --> $DIR/identity_op.rs:49:5 | |
f20569fa XL |
23 | | |
24 | LL | x | (0); | |
923072b8 | 25 | | ^^^^^^^ help: consider reducing it to: `x` |
f20569fa | 26 | |
923072b8 FG |
27 | error: this operation has no effect |
28 | --> $DIR/identity_op.rs:52:5 | |
f20569fa XL |
29 | | |
30 | LL | x * 1; | |
923072b8 | 31 | | ^^^^^ help: consider reducing it to: `x` |
f20569fa | 32 | |
923072b8 FG |
33 | error: this operation has no effect |
34 | --> $DIR/identity_op.rs:53:5 | |
f20569fa XL |
35 | | |
36 | LL | 1 * x; | |
923072b8 | 37 | | ^^^^^ help: consider reducing it to: `x` |
f20569fa | 38 | |
923072b8 FG |
39 | error: this operation has no effect |
40 | --> $DIR/identity_op.rs:59:5 | |
f20569fa XL |
41 | | |
42 | LL | -1 & x; | |
923072b8 | 43 | | ^^^^^^ help: consider reducing it to: `x` |
f20569fa | 44 | |
923072b8 FG |
45 | error: this operation has no effect |
46 | --> $DIR/identity_op.rs:62:5 | |
f20569fa XL |
47 | | |
48 | LL | u & 255; | |
923072b8 | 49 | | ^^^^^^^ help: consider reducing it to: `u` |
f20569fa | 50 | |
923072b8 FG |
51 | error: this operation has no effect |
52 | --> $DIR/identity_op.rs:65:5 | |
f20569fa XL |
53 | | |
54 | LL | 42 << 0; | |
923072b8 | 55 | | ^^^^^^^ help: consider reducing it to: `42` |
f20569fa | 56 | |
923072b8 FG |
57 | error: this operation has no effect |
58 | --> $DIR/identity_op.rs:66:5 | |
f20569fa XL |
59 | | |
60 | LL | 1 >> 0; | |
923072b8 | 61 | | ^^^^^^ help: consider reducing it to: `1` |
f20569fa | 62 | |
923072b8 FG |
63 | error: this operation has no effect |
64 | --> $DIR/identity_op.rs:67:5 | |
f20569fa XL |
65 | | |
66 | LL | 42 >> 0; | |
923072b8 | 67 | | ^^^^^^^ help: consider reducing it to: `42` |
f20569fa | 68 | |
923072b8 FG |
69 | error: this operation has no effect |
70 | --> $DIR/identity_op.rs:68:5 | |
a2a8927a XL |
71 | | |
72 | LL | &x >> 0; | |
f25598a0 | 73 | | ^^^^^^^ help: consider reducing it to: `x` |
a2a8927a | 74 | |
923072b8 FG |
75 | error: this operation has no effect |
76 | --> $DIR/identity_op.rs:69:5 | |
a2a8927a XL |
77 | | |
78 | LL | x >> &0; | |
923072b8 | 79 | | ^^^^^^^ help: consider reducing it to: `x` |
a2a8927a | 80 | |
923072b8 FG |
81 | error: this operation has no effect |
82 | --> $DIR/identity_op.rs:76:5 | |
04454e1e FG |
83 | | |
84 | LL | 2 % 3; | |
923072b8 | 85 | | ^^^^^ help: consider reducing it to: `2` |
04454e1e | 86 | |
923072b8 FG |
87 | error: this operation has no effect |
88 | --> $DIR/identity_op.rs:77:5 | |
04454e1e FG |
89 | | |
90 | LL | -2 % 3; | |
923072b8 | 91 | | ^^^^^^ help: consider reducing it to: `-2` |
04454e1e | 92 | |
923072b8 FG |
93 | error: this operation has no effect |
94 | --> $DIR/identity_op.rs:78:5 | |
04454e1e FG |
95 | | |
96 | LL | 2 % -3 + x; | |
923072b8 | 97 | | ^^^^^^ help: consider reducing it to: `2` |
04454e1e | 98 | |
923072b8 FG |
99 | error: this operation has no effect |
100 | --> $DIR/identity_op.rs:79:5 | |
04454e1e FG |
101 | | |
102 | LL | -2 % -3 + x; | |
923072b8 | 103 | | ^^^^^^^ help: consider reducing it to: `-2` |
04454e1e | 104 | |
923072b8 FG |
105 | error: this operation has no effect |
106 | --> $DIR/identity_op.rs:80:9 | |
04454e1e FG |
107 | | |
108 | LL | x + 1 % 3; | |
923072b8 | 109 | | ^^^^^ help: consider reducing it to: `1` |
04454e1e | 110 | |
923072b8 FG |
111 | error: this operation has no effect |
112 | --> $DIR/identity_op.rs:88:5 | |
04454e1e FG |
113 | | |
114 | LL | 0 + if b { 1 } else { 2 }; | |
923072b8 | 115 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(if b { 1 } else { 2 })` |
04454e1e | 116 | |
923072b8 FG |
117 | error: this operation has no effect |
118 | --> $DIR/identity_op.rs:89:5 | |
119 | | | |
120 | LL | 0 + if b { 1 } else { 2 } + if b { 3 } else { 4 }; | |
121 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(if b { 1 } else { 2 })` | |
122 | ||
123 | error: this operation has no effect | |
124 | --> $DIR/identity_op.rs:90:5 | |
04454e1e FG |
125 | | |
126 | LL | 0 + match a { 0 => 10, _ => 20 }; | |
923072b8 | 127 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(match a { 0 => 10, _ => 20 })` |
04454e1e | 128 | |
923072b8 | 129 | error: this operation has no effect |
04454e1e FG |
130 | --> $DIR/identity_op.rs:91:5 |
131 | | | |
923072b8 FG |
132 | LL | 0 + match a { 0 => 10, _ => 20 } + match a { 0 => 30, _ => 40 }; |
133 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(match a { 0 => 10, _ => 20 })` | |
04454e1e | 134 | |
923072b8 FG |
135 | error: this operation has no effect |
136 | --> $DIR/identity_op.rs:92:5 | |
04454e1e | 137 | | |
923072b8 FG |
138 | LL | 0 + if b { 1 } else { 2 } + match a { 0 => 30, _ => 40 }; |
139 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(if b { 1 } else { 2 })` | |
04454e1e | 140 | |
923072b8 FG |
141 | error: this operation has no effect |
142 | --> $DIR/identity_op.rs:93:5 | |
143 | | | |
144 | LL | 0 + match a { 0 => 10, _ => 20 } + if b { 3 } else { 4 }; | |
145 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(match a { 0 => 10, _ => 20 })` | |
146 | ||
147 | error: this operation has no effect | |
148 | --> $DIR/identity_op.rs:94:5 | |
149 | | | |
150 | LL | (if b { 1 } else { 2 }) + 0; | |
151 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(if b { 1 } else { 2 })` | |
152 | ||
153 | error: this operation has no effect | |
154 | --> $DIR/identity_op.rs:96:5 | |
04454e1e | 155 | | |
923072b8 FG |
156 | LL | 0 + { a } + 3; |
157 | | ^^^^^^^^^ help: consider reducing it to: `({ a })` | |
04454e1e | 158 | |
923072b8 FG |
159 | error: this operation has no effect |
160 | --> $DIR/identity_op.rs:97:5 | |
04454e1e | 161 | | |
923072b8 FG |
162 | LL | 0 + { a } * 2; |
163 | | ^^^^^^^^^^^^^ help: consider reducing it to: `({ a } * 2)` | |
04454e1e | 164 | |
923072b8 FG |
165 | error: this operation has no effect |
166 | --> $DIR/identity_op.rs:98:5 | |
04454e1e | 167 | | |
923072b8 FG |
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; })` | |
04454e1e | 170 | |
923072b8 FG |
171 | error: this operation has no effect |
172 | --> $DIR/identity_op.rs:103:7 | |
04454e1e | 173 | | |
923072b8 FG |
174 | LL | f(1 * a + { 8 * 5 }); |
175 | | ^^^^^ help: consider reducing it to: `a` | |
04454e1e | 176 | |
923072b8 FG |
177 | error: this operation has no effect |
178 | --> $DIR/identity_op.rs:104:7 | |
04454e1e | 179 | | |
923072b8 FG |
180 | LL | f(0 + if b { 1 } else { 2 } + 3); |
181 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `if b { 1 } else { 2 }` | |
04454e1e | 182 | |
923072b8 FG |
183 | error: this operation has no effect |
184 | --> $DIR/identity_op.rs:105:20 | |
04454e1e | 185 | | |
923072b8 FG |
186 | LL | const _: i32 = { 2 * 4 } + 0 + 3; |
187 | | ^^^^^^^^^^^^^ help: consider reducing it to: `{ 2 * 4 }` | |
04454e1e | 188 | |
923072b8 FG |
189 | error: this operation has no effect |
190 | --> $DIR/identity_op.rs:106:20 | |
04454e1e | 191 | | |
923072b8 FG |
192 | LL | const _: i32 = 0 + { 1 + 2 * 3 } + 3; |
193 | | ^^^^^^^^^^^^^^^^^ help: consider reducing it to: `{ 1 + 2 * 3 }` | |
04454e1e | 194 | |
923072b8 FG |
195 | error: this operation has no effect |
196 | --> $DIR/identity_op.rs:108:5 | |
04454e1e | 197 | | |
923072b8 FG |
198 | LL | 0 + a as usize; |
199 | | ^^^^^^^^^^^^^^ help: consider reducing it to: `a as usize` | |
04454e1e | 200 | |
923072b8 FG |
201 | error: this operation has no effect |
202 | --> $DIR/identity_op.rs:109:13 | |
04454e1e | 203 | | |
923072b8 FG |
204 | LL | let _ = 0 + a as usize; |
205 | | ^^^^^^^^^^^^^^ help: consider reducing it to: `a as usize` | |
04454e1e | 206 | |
923072b8 FG |
207 | error: this operation has no effect |
208 | --> $DIR/identity_op.rs:110:5 | |
04454e1e | 209 | | |
923072b8 FG |
210 | LL | 0 + { a } as usize; |
211 | | ^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `({ a } as usize)` | |
04454e1e | 212 | |
923072b8 FG |
213 | error: this operation has no effect |
214 | --> $DIR/identity_op.rs:112:9 | |
04454e1e | 215 | | |
923072b8 FG |
216 | LL | 2 * (0 + { a }); |
217 | | ^^^^^^^^^^^ help: consider reducing it to: `{ a }` | |
218 | ||
219 | error: this operation has no effect | |
220 | --> $DIR/identity_op.rs:113:5 | |
221 | | | |
222 | LL | 1 * ({ a } + 4); | |
223 | | ^^^^^^^^^^^^^^^ help: consider reducing it to: `(({ a } + 4))` | |
224 | ||
225 | error: this operation has no effect | |
226 | --> $DIR/identity_op.rs:114:5 | |
227 | | | |
228 | LL | 1 * 1; | |
229 | | ^^^^^ help: consider reducing it to: `1` | |
230 | ||
231 | error: this operation has no effect | |
f25598a0 FG |
232 | --> $DIR/identity_op.rs:118:18 |
233 | | | |
234 | LL | let _: i32 = &x + 0; | |
235 | | ^^^^^^ help: consider reducing it to: `x` | |
236 | ||
237 | error: this operation has no effect | |
238 | --> $DIR/identity_op.rs:122:5 | |
923072b8 FG |
239 | | |
240 | LL | 0 + if a { 1 } else { 2 } + if b { 3 } else { 5 } | |
241 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `(if a { 1 } else { 2 })` | |
04454e1e | 242 | |
f25598a0 | 243 | error: aborting due to 40 previous errors |
f20569fa | 244 |