X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=tests%2Fui%2Finconsistent_struct_constructor.fixed;h=d1025743790a9747bfb95c6bb746d0b1e15b917c;hb=6eae905808fe830a731ed37e3f4a6264ae98e129;hp=8d9c311003508173c227ebaef88e3d090a9e6ed7;hpb=61230f4cb822081ee17e8a660bc45a7b6ed0220d;p=rust.git 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 };