1 error: this `match` has identical arm bodies
2 --> $DIR/match_same_arms2.rs:20:14
6 LL | | //~ ERROR match arms have same body
8 LL | | let mut a = 42 + [23].len() as i32;
14 = note: `-D clippy::match-same-arms` implied by `-D warnings`
16 --> $DIR/match_same_arms2.rs:11:15
21 LL | | let mut a = 42 + [23].len() as i32;
27 note: `42` has the same arm body as the `_` wildcard, consider removing it
28 --> $DIR/match_same_arms2.rs:11:15
33 LL | | let mut a = 42 + [23].len() as i32;
40 error: this `match` has identical arm bodies
41 --> $DIR/match_same_arms2.rs:34:15
43 LL | 51 => foo(), //~ ERROR match arms have same body
47 --> $DIR/match_same_arms2.rs:33:15
51 help: consider refactoring into `42 | 51`
52 --> $DIR/match_same_arms2.rs:33:9
57 error: this `match` has identical arm bodies
58 --> $DIR/match_same_arms2.rs:40:17
60 LL | None => 24, //~ ERROR match arms have same body
64 --> $DIR/match_same_arms2.rs:39:20
68 help: consider refactoring into `Some(_) | None`
69 --> $DIR/match_same_arms2.rs:39:9
74 error: this `match` has identical arm bodies
75 --> $DIR/match_same_arms2.rs:62:28
77 LL | (None, Some(a)) => bar(a), //~ ERROR match arms have same body
81 --> $DIR/match_same_arms2.rs:61:28
83 LL | (Some(a), None) => bar(a),
85 help: consider refactoring into `(Some(a), None) | (None, Some(a))`
86 --> $DIR/match_same_arms2.rs:61:9
88 LL | (Some(a), None) => bar(a),
91 error: this `match` has identical arm bodies
92 --> $DIR/match_same_arms2.rs:68:26
94 LL | (.., Some(a)) => bar(a), //~ ERROR match arms have same body
98 --> $DIR/match_same_arms2.rs:67:26
100 LL | (Some(a), ..) => bar(a),
102 help: consider refactoring into `(Some(a), ..) | (.., Some(a))`
103 --> $DIR/match_same_arms2.rs:67:9
105 LL | (Some(a), ..) => bar(a),
108 error: aborting due to 5 previous errors