From 698f8c2f01ea549d77d7dc3338a12e04c11057b9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:02:58 +0200 Subject: Adding upstream version 1.64.0+dfsg1. Signed-off-by: Daniel Baumann --- .../tests/ui/inconsistent_struct_constructor.stderr | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/tools/clippy/tests/ui/inconsistent_struct_constructor.stderr (limited to 'src/tools/clippy/tests/ui/inconsistent_struct_constructor.stderr') diff --git a/src/tools/clippy/tests/ui/inconsistent_struct_constructor.stderr b/src/tools/clippy/tests/ui/inconsistent_struct_constructor.stderr new file mode 100644 index 000000000..c90189e96 --- /dev/null +++ b/src/tools/clippy/tests/ui/inconsistent_struct_constructor.stderr @@ -0,0 +1,20 @@ +error: struct constructor field order is inconsistent with struct definition field order + --> $DIR/inconsistent_struct_constructor.rs:33:9 + | +LL | Foo { y, x, z }; + | ^^^^^^^^^^^^^^^ help: try: `Foo { x, y, z }` + | + = note: `-D clippy::inconsistent-struct-constructor` implied by `-D warnings` + +error: struct constructor field order is inconsistent with struct definition field order + --> $DIR/inconsistent_struct_constructor.rs:55:9 + | +LL | / Foo { +LL | | z, +LL | | x, +LL | | ..Default::default() +LL | | }; + | |_________^ help: try: `Foo { x, z, ..Default::default() }` + +error: aborting due to 2 previous errors + -- cgit v1.2.3