@@ -21,15 +21,15 @@ LL | | if true {
2121... |
2222LL | | a
2323LL | | },
24- | |_________ ^
24+ | |__________ ^
2525 = note: `-D clippy::match-same-arms` implied by `-D warnings`
2626 = help: to override `-D warnings` add `#[allow(clippy::match_same_arms)]`
2727
2828error: this match arm has an identical body to another arm
2929 --> tests/ui/match_same_arms2.rs:40:9
3030 |
3131LL | 51 => foo(),
32- | ^^^^^^^^^^^
32+ | ^^^^^^^^^^^^
3333 |
3434 = help: try changing either arm body
3535help: or try merging the arm patterns and removing the obsolete arm
@@ -43,7 +43,7 @@ error: this match arm has an identical body to another arm
4343 --> tests/ui/match_same_arms2.rs:46:9
4444 |
4545LL | None => 24,
46- | ^^^^^^^^^^
46+ | ^^^^^^^^^^^
4747 |
4848 = help: try changing either arm body
4949help: or try merging the arm patterns and removing the obsolete arm
@@ -57,7 +57,7 @@ error: this match arm has an identical body to another arm
5757 --> tests/ui/match_same_arms2.rs:68:9
5858 |
5959LL | (None, Some(a)) => bar(a),
60- | ^^^^^^^^^^^^^^^^^^^^^^^^^
60+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
6161 |
6262 = help: try changing either arm body
6363help: or try merging the arm patterns and removing the obsolete arm
@@ -71,7 +71,7 @@ error: this match arm has an identical body to another arm
7171 --> tests/ui/match_same_arms2.rs:82:9
7272 |
7373LL | (None, Some(a)) if a == 42 => a,
74- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
74+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7575 |
7676 = help: try changing either arm body
7777help: or try merging the arm patterns and removing the obsolete arm
@@ -85,7 +85,7 @@ error: this match arm has an identical body to another arm
8585 --> tests/ui/match_same_arms2.rs:87:9
8686 |
8787LL | (Some(a), ..) => bar(a),
88- | ^^^^^^^^^^^^^^^^^^^^^^^
88+ | ^^^^^^^^^^^^^^^^^^^^^^^^
8989 |
9090 = help: try changing either arm body
9191help: or try merging the arm patterns and removing the obsolete arm
@@ -98,7 +98,7 @@ error: this match arm has an identical body to another arm
9898 --> tests/ui/match_same_arms2.rs:121:9
9999 |
100100LL | (Ok(x), Some(_)) => println!("ok {}", x),
101- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
101+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
102102 |
103103 = help: try changing either arm body
104104help: or try merging the arm patterns and removing the obsolete arm
@@ -111,7 +111,7 @@ error: this match arm has an identical body to another arm
111111 --> tests/ui/match_same_arms2.rs:137:9
112112 |
113113LL | Ok(_) => println!("ok"),
114- | ^^^^^^^^^^^^^^^^^^^^^^^
114+ | ^^^^^^^^^^^^^^^^^^^^^^^^
115115 |
116116 = help: try changing either arm body
117117help: or try merging the arm patterns and removing the obsolete arm
@@ -127,7 +127,7 @@ error: this match arm has an identical body to another arm
127127LL | / 1 => {
128128LL | | empty!(0);
129129LL | | },
130- | |_________ ^
130+ | |__________ ^
131131 |
132132 = help: try changing either arm body
133133help: or try merging the arm patterns and removing the obsolete arm
@@ -143,7 +143,7 @@ error: this match arm has an identical body to another arm
143143 --> tests/ui/match_same_arms2.rs:215:9
144144 |
145145LL | Foo::X(0) => 1,
146- | ^^^^^^^^^^^^^^
146+ | ^^^^^^^^^^^^^^^
147147 |
148148 = help: try changing either arm body
149149help: or try merging the arm patterns and removing the obsolete arm
@@ -157,7 +157,7 @@ error: this match arm has an identical body to another arm
157157 --> tests/ui/match_same_arms2.rs:225:9
158158 |
159159LL | Foo::Z(_) => 1,
160- | ^^^^^^^^^^^^^^
160+ | ^^^^^^^^^^^^^^^
161161 |
162162 = help: try changing either arm body
163163help: or try merging the arm patterns and removing the obsolete arm
@@ -170,7 +170,7 @@ error: this match arm has an identical body to another arm
170170 --> tests/ui/match_same_arms2.rs:248:9
171171 |
172172LL | Some(Bar { y: 0, x: 5, .. }) => 1,
173- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
173+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
174174 |
175175 = help: try changing either arm body
176176help: or try merging the arm patterns and removing the obsolete arm
@@ -184,7 +184,7 @@ error: this match arm has an identical body to another arm
184184 --> tests/ui/match_same_arms2.rs:262:9
185185 |
186186LL | 1 => cfg!(not_enable),
187- | ^^^^^^^^^^^^^^^^^^^^^
187+ | ^^^^^^^^^^^^^^^^^^^^^^
188188 |
189189 = help: try changing either arm body
190190help: or try merging the arm patterns and removing the obsolete arm
@@ -198,7 +198,7 @@ error: this match arm has an identical body to another arm
198198 --> tests/ui/match_same_arms2.rs:278:17
199199 |
200200LL | MaybeStaticStr::Borrowed(s) => s,
201- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
201+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
202202 |
203203 = help: try changing either arm body
204204help: or try merging the arm patterns and removing the obsolete arm
0 commit comments