mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 21:53:23 +00:00
21 lines
797 B
Text
21 lines
797 B
Text
error: struct constructor field order is inconsistent with struct definition field order
|
|
--> tests/ui/inconsistent_struct_constructor.rs:28:9
|
|
|
|
|
LL | Foo { y, x, z };
|
|
| ^^^^^^^^^^^^^^^ help: try: `Foo { x, y, z }`
|
|
|
|
|
= note: `-D clippy::inconsistent-struct-constructor` implied by `-D warnings`
|
|
= help: to override `-D warnings` add `#[allow(clippy::inconsistent_struct_constructor)]`
|
|
|
|
error: struct constructor field order is inconsistent with struct definition field order
|
|
--> tests/ui/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
|
|
|