2021-03-25 13:29:11 -05:00
|
|
|
error: struct constructor field order is inconsistent with struct definition field order
|
2023-03-24 08:04:35 -05:00
|
|
|
--> $DIR/inconsistent_struct_constructor.rs:29:9
|
2021-02-25 04:25:22 -06:00
|
|
|
|
|
|
|
|
LL | Foo { y, x, z };
|
|
|
|
| ^^^^^^^^^^^^^^^ help: try: `Foo { x, y, z }`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::inconsistent-struct-constructor` implied by `-D warnings`
|
|
|
|
|
2021-03-25 13:29:11 -05:00
|
|
|
error: struct constructor field order is inconsistent with struct definition field order
|
2023-03-24 08:04:35 -05:00
|
|
|
--> $DIR/inconsistent_struct_constructor.rs:56:9
|
2021-02-25 04:25:22 -06:00
|
|
|
|
|
|
|
|
LL | / Foo {
|
|
|
|
LL | | z,
|
|
|
|
LL | | x,
|
|
|
|
LL | | ..Default::default()
|
|
|
|
LL | | };
|
|
|
|
| |_________^ help: try: `Foo { x, z, ..Default::default() }`
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|