Added test for single_match in macro
This commit is contained in:
parent
1cac2f9e86
commit
ba6a3280f5
@ -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 New Issue
Block a user