]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/single_match.rs
iterate List by value
[rust.git] / tests / ui / single_match.rs
index 980ce9a0fabe5a365650ff7f3dd8dfaf7c2f5a7d..1c55af5dfb673536605d3443bc135b4d49209e65 100644 (file)
@@ -81,4 +81,15 @@ fn single_match_know_enum() {
     }
 }
 
-fn main() {}
+macro_rules! single_match {
+    ($num:literal) => {
+        match $num {
+            15 => println!("15"),
+            _ => (),
+        }
+    };
+}
+
+fn main() {
+    single_match!(5);
+}