mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-26 22:50:56 +00:00
Added test for single_match in macro
This commit is contained in:
parent
1cac2f9e86
commit
ba6a3280f5
1 changed files with 10 additions and 1 deletions
|
@ -81,4 +81,13 @@ fn single_match_know_enum() {
|
|||
}
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
macro_rules! single_match {
|
||||
($num:literal) => {
|
||||
match $num {
|
||||
15 => println!("15"),
|
||||
_ => (),
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
fn main() {single_match!(5);}
|
||||
|
|
Loading…
Reference in a new issue