]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/match_single_binding.fixed
iterate List by value
[rust.git] / tests / ui / match_single_binding.fixed
index 90f00aa78712da078d625737713a34763873300f..f3627902eec985b15e2e192b0371285fa0848b57 100644 (file)
@@ -12,6 +12,14 @@ fn coords() -> Point {
     Point { x: 1, y: 2 }
 }
 
+macro_rules! foo {
+    ($param:expr) => {
+        match $param {
+            _ => println!("whatever"),
+        }
+    };
+}
+
 fn main() {
     let a = 1;
     let b = 2;
@@ -25,6 +33,8 @@ fn main() {
     let (x, y, z) = (a, b, c);
     println!("{} {} {}", x, y, z);
     // Ok
+    foo!(a);
+    // Ok
     match a {
         2 => println!("2"),
         _ => println!("Not 2"),