rust/tests/ui-toml/toml_unknown_key
Timo a8968e5dd8
Make inconsistent_struct_constructor "all fields are shorthand" requirement configurable (#13737)
Fixes #11846.

This PR has three commits:
- The first commit adds an `initializer-suggestions` configuration to
control suggestion applicability when initializers are present. The
following are the options:
  - "none": do not suggest
- "maybe-incorrect": suggest, but do not apply suggestions with `--fix`
  - "machine-applicable": suggest and apply suggestions with `--fix`
- The second commit fixes suggestions to handle field attributes
(problem [noticed by
@samueltardieu](https://github.com/rust-lang/rust-clippy/pull/13737#discussion_r1859261645)).
- The third commit adds `initializer-suggestions = "machine-applicable"`
to Clippy's `clippy.toml` and applies the suggestions. (Nothing seems to
break.)

---

changelog: make `inconsistent_struct_constructor` "all fields are
shorthand" requirement configurable
2024-12-27 22:05:03 +00:00
..
clippy.toml suggest similar config option if one is found 2024-01-25 00:11:43 +01:00
conf_unknown_key.rs suggest similar config option if one is found 2024-01-25 00:11:43 +01:00
conf_unknown_key.stderr Make inconsistent_struct_constructor "all fields are shorthand" requirement configurable (#13737) 2024-12-27 22:05:03 +00:00