-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
21 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
// run-rustfix | ||
|
||
#![warn(clippy::wildcard_in_or_patterns)] | ||
|
||
fn main() { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,35 @@ | ||
error: wildcard pattern covers any other pattern as it will match anyway. | ||
--> $DIR/wild_in_or_pats.rs:10:9 | ||
--> $DIR/wild_in_or_pats.rs:8:9 | ||
| | ||
LL | "bar" | _ => { | ||
| ^^^^^^^^^ help: consider replacing with wildcard pattern only: `_` | ||
| ^^^^^^^^^ | ||
| | ||
= note: `-D clippy::wildcard-in-or-patterns` implied by `-D warnings` | ||
= help: Consider handling `_` separately. | ||
|
||
error: wildcard pattern covers any other pattern as it will match anyway. | ||
--> $DIR/wild_in_or_pats.rs:18:9 | ||
--> $DIR/wild_in_or_pats.rs:16:9 | ||
| | ||
LL | "bar" | "bar2" | _ => { | ||
| ^^^^^^^^^^^^^^^^^^ help: consider replacing with wildcard pattern only: `_` | ||
| ^^^^^^^^^^^^^^^^^^ | ||
| | ||
= help: Consider handling `_` separately. | ||
|
||
error: wildcard pattern covers any other pattern as it will match anyway. | ||
--> $DIR/wild_in_or_pats.rs:26:9 | ||
--> $DIR/wild_in_or_pats.rs:24:9 | ||
| | ||
LL | _ | "bar" | _ => { | ||
| ^^^^^^^^^^^^^ help: consider replacing with wildcard pattern only: `_` | ||
| ^^^^^^^^^^^^^ | ||
| | ||
= help: Consider handling `_` separately. | ||
|
||
error: wildcard pattern covers any other pattern as it will match anyway. | ||
--> $DIR/wild_in_or_pats.rs:34:9 | ||
--> $DIR/wild_in_or_pats.rs:32:9 | ||
| | ||
LL | _ | "bar" => { | ||
| ^^^^^^^^^ help: consider replacing with wildcard pattern only: `_` | ||
| ^^^^^^^^^ | ||
| | ||
= help: Consider handling `_` separately. | ||
|
||
error: aborting due to 4 previous errors | ||
|