diff options
| author | Samuel Moelius <sam@moeli.us> | 2024-11-26 06:09:29 -0500 |
|---|---|---|
| committer | Samuel Moelius <sam@moeli.us> | 2024-12-26 19:36:58 -0500 |
| commit | 8a38bcc39083a2c73c2b7f27870d6bef85756f52 (patch) | |
| tree | 833fe27fa609e757565598a6bc87dfda2c290586 /clippy_dev | |
| parent | b8e569e9c006100be58155d037735561fe600faf (diff) | |
| download | rust-8a38bcc39083a2c73c2b7f27870d6bef85756f52.tar.gz rust-8a38bcc39083a2c73c2b7f27870d6bef85756f52.zip | |
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`
Diffstat (limited to 'clippy_dev')
| -rw-r--r-- | clippy_dev/src/fmt.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clippy_dev/src/fmt.rs b/clippy_dev/src/fmt.rs index c6673859282..790dafa811f 100644 --- a/clippy_dev/src/fmt.rs +++ b/clippy_dev/src/fmt.rs @@ -179,8 +179,8 @@ fn fmt_conf(check: bool) -> Result<(), Error> { #[expect(clippy::drain_collect)] fields.push(ClippyConf { name, - lints: lints.drain(..).collect(), attrs: &conf[attrs_start..attrs_end], + lints: lints.drain(..).collect(), field: conf[field_start..i].trim_end(), }); attrs_start = i; @@ -191,8 +191,8 @@ fn fmt_conf(check: bool) -> Result<(), Error> { #[expect(clippy::drain_collect)] fields.push(ClippyConf { name, - lints: lints.drain(..).collect(), attrs: &conf[attrs_start..attrs_end], + lints: lints.drain(..).collect(), field: conf[field_start..i].trim_end(), }); attrs_start = i; @@ -220,8 +220,8 @@ fn fmt_conf(check: bool) -> Result<(), Error> { } fields.push(ClippyConf { name, - lints, attrs: &conf[attrs_start..attrs_end], + lints, field: conf[field_start..].trim_end(), }); |
