Added test for single_match in macro

This commit is contained in:
pmk21 2020-03-31 15:49:27 +05:30
parent 1cac2f9e86
commit ba6a3280f5

View File

@ -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);}