Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit ba6a328

Browse files
committed
Added test for single_match in macro
1 parent 1cac2f9 commit ba6a328

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

tests/ui/single_match.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,4 +81,13 @@ fn single_match_know_enum() {
8181
}
8282
}
8383

84-
fn main() {}
84+
macro_rules! single_match {
85+
($num:literal) => {
86+
match $num {
87+
15 => println!("15"),
88+
_ => (),
89+
}
90+
};
91+
}
92+
93+
fn main() {single_match!(5);}

0 commit comments

Comments
 (0)