]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/tests/ui/inconsistent_struct_constructor.rs
Merge commit '98e2b9f25b6db4b2680a3d388456d9f95cb28344' into clippyup
[rust.git] / src / tools / clippy / tests / ui / inconsistent_struct_constructor.rs
index 63fac9105015d3756b5be6edc83c52777c5d5179..b095aa64a2174371e94d9f2c240ed910c9c893ca 100644 (file)
@@ -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 @@ fn test() {
         // Should lint.
         Foo { y, x, 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 };