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: this `match` has identical arm bodies
109 --> $DIR/match_same_arms2.rs:102:29
111 LL | (Ok(_), Some(x)) => println!("ok {}", x),
112 | ^^^^^^^^^^^^^^^^^^^^
115 --> $DIR/match_same_arms2.rs:101:29
117 LL | (Ok(x), Some(_)) => println!("ok {}", x),
118 | ^^^^^^^^^^^^^^^^^^^^
119 help: consider refactoring into `(Ok(x), Some(_)) | (Ok(_), Some(x))`
120 --> $DIR/match_same_arms2.rs:101:9
122 LL | (Ok(x), Some(_)) => println!("ok {}", x),
124 = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
126 error: this `match` has identical arm bodies
127 --> $DIR/match_same_arms2.rs:117:18
129 LL | Ok(_) => println!("ok"),
133 --> $DIR/match_same_arms2.rs:116:18
135 LL | Ok(3) => println!("ok"),
137 help: consider refactoring into `Ok(3) | Ok(_)`
138 --> $DIR/match_same_arms2.rs:116:9
140 LL | Ok(3) => println!("ok"),
142 = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
144 error: aborting due to 7 previous errors