1 error: this `match` has identical arm bodies
2 --> $DIR/match_same_arms.rs:37: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_arms.rs:28: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_arms.rs:28:15
33 LL | | let mut a = 42 + [23].len() as i32;
40 error: this `match` has identical arm bodies
41 --> $DIR/match_same_arms.rs:52:14
43 LL | _ => 0, //~ ERROR match arms have same body
47 --> $DIR/match_same_arms.rs:50:19
51 note: `Abc::A` has the same arm body as the `_` wildcard, consider removing it`
52 --> $DIR/match_same_arms.rs:50:19
57 error: this `match` has identical arm bodies
58 --> $DIR/match_same_arms.rs:57:15
60 LL | 51 => foo(), //~ ERROR match arms have same body
64 --> $DIR/match_same_arms.rs:56:15
68 note: consider refactoring into `42 | 51`
69 --> $DIR/match_same_arms.rs:56:15
74 error: this `match` has identical arm bodies
75 --> $DIR/match_same_arms.rs:63:17
77 LL | None => 24, //~ ERROR match arms have same body
81 --> $DIR/match_same_arms.rs:62:20
85 note: consider refactoring into `Some(_) | None`
86 --> $DIR/match_same_arms.rs:62:20
91 error: this `match` has identical arm bodies
92 --> $DIR/match_same_arms.rs:85:28
94 LL | (None, Some(a)) => bar(a), //~ ERROR match arms have same body
98 --> $DIR/match_same_arms.rs:84:28
100 LL | (Some(a), None) => bar(a),
102 note: consider refactoring into `(Some(a), None) | (None, Some(a))`
103 --> $DIR/match_same_arms.rs:84:28
105 LL | (Some(a), None) => bar(a),
108 error: this `match` has identical arm bodies
109 --> $DIR/match_same_arms.rs:91:26
111 LL | (.., Some(a)) => bar(a), //~ ERROR match arms have same body
115 --> $DIR/match_same_arms.rs:90:26
117 LL | (Some(a), ..) => bar(a),
119 note: consider refactoring into `(Some(a), ..) | (.., Some(a))`
120 --> $DIR/match_same_arms.rs:90:26
122 LL | (Some(a), ..) => bar(a),
125 error: this `match` has identical arm bodies
126 --> $DIR/match_same_arms.rs:97:20
128 LL | (.., 3) => 42, //~ ERROR match arms have same body
132 --> $DIR/match_same_arms.rs:96:23
134 LL | (1, .., 3) => 42,
136 note: consider refactoring into `(1, .., 3) | (.., 3)`
137 --> $DIR/match_same_arms.rs:96:23
139 LL | (1, .., 3) => 42,
142 error: aborting due to 7 previous errors