1 error: this `if` has identical blocks
2 --> $DIR/copies.rs:50:12
6 LL | | //~ ERROR same body as `if` block
7 LL | | Foo { bar: 42 };
14 = note: `-D clippy::if-same-then-else` implied by `-D warnings`
16 --> $DIR/copies.rs:42:13
20 LL | | Foo { bar: 42 };
28 error: this `match` has identical arm bodies
29 --> $DIR/copies.rs:96:14
33 LL | | //~ ERROR match arms have same body
35 LL | | let mut a = 42 + [23].len() as i32;
41 = note: `-D clippy::match-same-arms` implied by `-D warnings`
43 --> $DIR/copies.rs:87:15
48 LL | | let mut a = 42 + [23].len() as i32;
54 note: `42` has the same arm body as the `_` wildcard, consider removing it`
55 --> $DIR/copies.rs:87:15
60 LL | | let mut a = 42 + [23].len() as i32;
67 error: this `match` has identical arm bodies
68 --> $DIR/copies.rs:111:14
70 LL | _ => 0, //~ ERROR match arms have same body
74 --> $DIR/copies.rs:109:19
78 note: `Abc::A` has the same arm body as the `_` wildcard, consider removing it`
79 --> $DIR/copies.rs:109:19
84 error: this `if` has identical blocks
85 --> $DIR/copies.rs:120:12
89 LL | | //~ ERROR same body as `if` block
95 --> $DIR/copies.rs:118:21
97 LL | let _ = if true {
98 | _____________________^
103 error: this `if` has identical blocks
104 --> $DIR/copies.rs:134:12
108 LL | | //~ ERROR same body as `if` block
109 LL | | for _ in &[42] {
110 LL | | let foo: &Option<_> = &Some::<u8>(42);
117 --> $DIR/copies.rs:125:13
121 LL | | for _ in &[42] {
122 LL | | let foo: &Option<_> = &Some::<u8>(42);
129 error: this `if` has identical blocks
130 --> $DIR/copies.rs:153:12
134 LL | | //~ ERROR same body as `if` block
135 LL | | let bar = if true { 42 } else { 43 };
143 --> $DIR/copies.rs:146:13
147 LL | | let bar = if true { 42 } else { 43 };
155 error: this `if` has identical blocks
156 --> $DIR/copies.rs:183:12
160 LL | | //~ ERROR same body as `if` block
161 LL | | if let Some(a) = Some(42) {}
166 --> $DIR/copies.rs:181:13
170 LL | | if let Some(a) = Some(42) {}
174 error: this `if` has identical blocks
175 --> $DIR/copies.rs:190:12
179 LL | | //~ ERROR same body as `if` block
180 LL | | if let (1, .., 3) = (1, 2, 3) {}
185 --> $DIR/copies.rs:188:13
189 LL | | if let (1, .., 3) = (1, 2, 3) {}
193 error: this `match` has identical arm bodies
194 --> $DIR/copies.rs:239:15
196 LL | 51 => foo(), //~ ERROR match arms have same body
200 --> $DIR/copies.rs:238:15
204 note: consider refactoring into `42 | 51`
205 --> $DIR/copies.rs:238:15
210 error: this `match` has identical arm bodies
211 --> $DIR/copies.rs:245:17
213 LL | None => 24, //~ ERROR match arms have same body
217 --> $DIR/copies.rs:244:20
221 note: consider refactoring into `Some(_) | None`
222 --> $DIR/copies.rs:244:20
227 error: this `match` has identical arm bodies
228 --> $DIR/copies.rs:267:28
230 LL | (None, Some(a)) => bar(a), //~ ERROR match arms have same body
234 --> $DIR/copies.rs:266:28
236 LL | (Some(a), None) => bar(a),
238 note: consider refactoring into `(Some(a), None) | (None, Some(a))`
239 --> $DIR/copies.rs:266:28
241 LL | (Some(a), None) => bar(a),
244 error: this `match` has identical arm bodies
245 --> $DIR/copies.rs:273:26
247 LL | (.., Some(a)) => bar(a), //~ ERROR match arms have same body
251 --> $DIR/copies.rs:272:26
253 LL | (Some(a), ..) => bar(a),
255 note: consider refactoring into `(Some(a), ..) | (.., Some(a))`
256 --> $DIR/copies.rs:272:26
258 LL | (Some(a), ..) => bar(a),
261 error: this `match` has identical arm bodies
262 --> $DIR/copies.rs:279:20
264 LL | (.., 3) => 42, //~ ERROR match arms have same body
268 --> $DIR/copies.rs:278:23
270 LL | (1, .., 3) => 42,
272 note: consider refactoring into `(1, .., 3) | (.., 3)`
273 --> $DIR/copies.rs:278:23
275 LL | (1, .., 3) => 42,
278 error: this `if` has identical blocks
279 --> $DIR/copies.rs:285:12
283 LL | | //~ ERROR same body as `if` block
289 --> $DIR/copies.rs:283:21
291 LL | let _ = if true {
292 | _____________________^
297 error: this `if` has identical blocks
298 --> $DIR/copies.rs:292:12
302 LL | | //~ ERROR same body as `if` block
308 --> $DIR/copies.rs:290:21
310 LL | let _ = if true {
311 | _____________________^
316 error: this `if` has identical blocks
317 --> $DIR/copies.rs:305:12
321 LL | | //~ ERROR same body as `if` block
327 --> $DIR/copies.rs:303:21
329 LL | let _ = if true {
330 | _____________________^
335 error: this `if` has identical blocks
336 --> $DIR/copies.rs:323:12
340 LL | | //~ ERROR same body as `if` block
341 LL | | try!(Ok("foo"));
346 --> $DIR/copies.rs:321:13
350 LL | | try!(Ok("foo"));
354 error: aborting due to 17 previous errors