2021-03-12 19:40:23 +00:00
|
|
|
error: struct constructor field order is inconsistent with struct definition field order
|
2023-07-27 11:40:22 +00:00
|
|
|
--> $DIR/inconsistent_struct_constructor.rs:28:9
|
2021-02-20 13:52:56 +00:00
|
|
|
|
|
|
|
|
LL | Foo { y, x, z };
|
|
|
|
| ^^^^^^^^^^^^^^^ help: try: `Foo { x, y, z }`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::inconsistent-struct-constructor` implied by `-D warnings`
|
|
|
|
|
2021-03-12 19:40:23 +00:00
|
|
|
error: struct constructor field order is inconsistent with struct definition field order
|
2023-07-27 11:40:22 +00:00
|
|
|
--> $DIR/inconsistent_struct_constructor.rs:55:9
|
2021-02-20 13:52:56 +00: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
|
|
|
|
|