@@ -53,6 +53,7 @@ help: consider refactoring into `42 | 51`
5353 |
5454LL | 42 => foo(),
5555 | ^^
56+ = help: ...or consider changing the match arm bodies
5657
5758error: this `match` has identical arm bodies
5859 --> $DIR/match_same_arms2.rs:40:17
@@ -70,6 +71,7 @@ help: consider refactoring into `Some(_) | None`
7071 |
7172LL | Some(_) => 24,
7273 | ^^^^^^^
74+ = help: ...or consider changing the match arm bodies
7375
7476error: this `match` has identical arm bodies
7577 --> $DIR/match_same_arms2.rs:62:28
@@ -87,6 +89,7 @@ help: consider refactoring into `(Some(a), None) | (None, Some(a))`
8789 |
8890LL | (Some(a), None) => bar(a),
8991 | ^^^^^^^^^^^^^^^
92+ = help: ...or consider changing the match arm bodies
9093
9194error: this `match` has identical arm bodies
9295 --> $DIR/match_same_arms2.rs:68:26
@@ -104,6 +107,7 @@ help: consider refactoring into `(Some(a), ..) | (.., Some(a))`
104107 |
105108LL | (Some(a), ..) => bar(a),
106109 | ^^^^^^^^^^^^^
110+ = help: ...or consider changing the match arm bodies
107111
108112error: this `match` has identical arm bodies
109113 --> $DIR/match_same_arms2.rs:102:29
@@ -121,6 +125,7 @@ help: consider refactoring into `(Ok(x), Some(_)) | (Ok(_), Some(x))`
121125 |
122126LL | (Ok(x), Some(_)) => println!("ok {}", x),
123127 | ^^^^^^^^^^^^^^^^
128+ = help: ...or consider changing the match arm bodies
124129 = note: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
125130
126131error: this `match` has identical arm bodies
@@ -139,6 +144,7 @@ help: consider refactoring into `Ok(3) | Ok(_)`
139144 |
140145LL | Ok(3) => println!("ok"),
141146 | ^^^^^
147+ = help: ...or consider changing the match arm bodies
142148 = note: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
143149
144150error: this `match` has identical arm bodies
@@ -163,6 +169,7 @@ help: consider refactoring into `0 | 1`
163169 |
164170LL | 0 => {
165171 | ^
172+ = help: ...or consider changing the match arm bodies
166173
167174error: match expression looks like `matches!` macro
168175 --> $DIR/match_same_arms2.rs:162:16
0 commit comments