]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/rest_pat_in_fully_bound_structs.rs
iterate List by value
[rust.git] / tests / ui / rest_pat_in_fully_bound_structs.rs
index 22e4d4edd783f6c1eeeb26f6a8eba797135f119f..38fc9969804fa593e46df30c22ed61ca3072dce6 100644 (file)
@@ -6,6 +6,15 @@ struct A {
     c: &'static str,
 }
 
+macro_rules! foo {
+    ($param:expr) => {
+        match $param {
+            A { a: 0, b: 0, c: "", .. } => {},
+            _ => {},
+        }
+    };
+}
+
 fn main() {
     let a_struct = A { a: 5, b: 42, c: "A" };
 
@@ -27,4 +36,7 @@ fn main() {
         A { a: 0, b: 0, .. } => {},
         _ => {},
     }
+
+    // No lint
+    foo!(a_struct);
 }