rust/tests/ui/inconsistent_struct_constructor.stderr
Samuel Moelius 8a38bcc390 Make "all fields are shorthand" requirement configurable
Handle field attributes in suggestions

Fix adjacent code

Address review comments

https://github.com/rust-lang/rust-clippy/pull/13737#discussion_r1861352124

Address all review comments but one

This comment is not yet addressed: https://github.com/rust-lang/rust-clippy/pull/13737#discussion_r1874544907

`initializer_suggestions` -> `lint_inconsistent_struct_field_initializers`
2024-12-26 19:36:58 -05:00

24 lines
731 B
Text

error: struct constructor field order is inconsistent with struct definition field order
--> tests/ui/inconsistent_struct_constructor.rs:36:15
|
LL | Foo { y, x, z };
| ^^^^^^^ help: try: `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:64:13
|
LL | / z,
LL | | x,
| |_____________^
|
help: try
|
LL ~ x,
LL ~ z,
|
error: aborting due to 2 previous errors