rust-clippy/tests/ui/inconsistent_struct_constructor.stderr

21 lines
696 B
Text
Raw Normal View History

error: struct constructor field order is inconsistent with struct definition field order
2021-04-20 04:33:39 +00:00
--> $DIR/inconsistent_struct_constructor.rs:34: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
2021-04-20 04:33:39 +00:00
--> $DIR/inconsistent_struct_constructor.rs:56: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