rust/tests/ui/pats_with_wild_match_arm.fixed
ThibsG 96c4198832 New lint: pats_with_wild_match_arm
- Wildcard use with other pattern in same match arm
2020-01-07 18:48:16 +01:00

39 lines
694 B
Rust

// run-rustfix
#![warn(clippy::pats_with_wild_match_arm)]
fn main() {
match "foo" {
"a" => {
dbg!("matched a");
},
_ => {
dbg!("matched (bar or) wild");
},
};
match "foo" {
"a" => {
dbg!("matched a");
},
_ => {
dbg!("matched (bar or bar2 or) wild");
},
};
match "foo" {
"a" => {
dbg!("matched a");
},
_ => {
dbg!("matched (bar or) wild");
},
};
match "foo" {
"a" => {
dbg!("matched a");
},
_ => {
dbg!("matched (bar or) wild");
},
};
}