about summary refs log tree commit diff
path: root/tests/ui/inconsistent_struct_constructor.fixed
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/inconsistent_struct_constructor.fixed')
-rw-r--r--tests/ui/inconsistent_struct_constructor.fixed13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/ui/inconsistent_struct_constructor.fixed b/tests/ui/inconsistent_struct_constructor.fixed
index 8d9c3110035..d1025743790 100644
--- a/tests/ui/inconsistent_struct_constructor.fixed
+++ b/tests/ui/inconsistent_struct_constructor.fixed
@@ -13,6 +13,15 @@ struct Foo {
     z: i32,
 }
 
+macro_rules! new_foo {
+    () => {
+        let x = 1;
+        let y = 1;
+        let z = 1;
+        Foo { y, x, z }
+    };
+}
+
 mod without_base {
     use super::Foo;
 
@@ -24,6 +33,10 @@ mod without_base {
         // Should lint.
         Foo { x, y, z };
 
+        // Should NOT lint.
+        // issue #7069.
+        new_foo!();
+
         // Shoule NOT lint because the order is the same as in the definition.
         Foo { x, y, z };