2021-03-25 18:29:11 +00:00
|
|
|
error: struct constructor field order is inconsistent with struct definition field order
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/inconsistent_struct_constructor.rs:28:9
|
2021-02-25 10:25:22 +00:00
|
|
|
|
|
|
|
|
LL | Foo { y, x, z };
|
|
|
|
| ^^^^^^^^^^^^^^^ help: try: `Foo { x, y, z }`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::inconsistent-struct-constructor` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::inconsistent_struct_constructor)]`
|
2021-02-25 10:25:22 +00:00
|
|
|
|
2021-03-25 18:29:11 +00:00
|
|
|
error: struct constructor field order is inconsistent with struct definition field order
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/inconsistent_struct_constructor.rs:55:9
|
2021-02-25 10:25:22 +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
|
|
|
|
|