mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-10 07:04:18 +00:00
36 lines
722 B
Rust
36 lines
722 B
Rust
#![warn(clippy::wildcard_in_or_patterns)]
|
|
|
|
fn main() {
|
|
match "foo" {
|
|
"a" => {
|
|
dbg!("matched a");
|
|
},
|
|
"bar" | _ => {
|
|
dbg!("matched (bar or) wild");
|
|
},
|
|
};
|
|
match "foo" {
|
|
"a" => {
|
|
dbg!("matched a");
|
|
},
|
|
"bar" | "bar2" | _ => {
|
|
dbg!("matched (bar or bar2 or) wild");
|
|
},
|
|
};
|
|
match "foo" {
|
|
"a" => {
|
|
dbg!("matched a");
|
|
},
|
|
_ | "bar" | _ => {
|
|
dbg!("matched (bar or) wild");
|
|
},
|
|
};
|
|
match "foo" {
|
|
"a" => {
|
|
dbg!("matched a");
|
|
},
|
|
_ | "bar" => {
|
|
dbg!("matched (bar or) wild");
|
|
},
|
|
};
|
|
}
|