about summary refs log tree commit diff
path: root/compiler/rustc_pattern_analysis/src/errors.rs
diff options
context:
space:
mode:
authorCatherine Flores <catherine.3.flores@gmail.com>2025-03-05 22:38:15 +0000
committerGitHub <noreply@github.com>2025-03-05 22:38:15 +0000
commit231bf457bac4eaba6ee183d8d513f824944b4476 (patch)
tree5e5ebf5e44894b3f89c770fcfcb1b90b874eeced /compiler/rustc_pattern_analysis/src/errors.rs
parent06e75900f7ef061360ee8c80d8064b8b06ffb712 (diff)
parent8c73b76fb2f32674f76254e07474a596afee8120 (diff)
downloadrust-231bf457bac4eaba6ee183d8d513f824944b4476.tar.gz
rust-231bf457bac4eaba6ee183d8d513f824944b4476.zip
Make `struct_field_names` check private fields of public structs. (#14076)
Currently, If a struct is `pub` and its field is private, and
`avoid-breaking-exported-api = true` (default), then
`struct_field_names` will not lint the field, even though changing the
field’s name is not a breaking change. This is because the
breaking-exported-api condition was checking the visibility of the
struct, not its fields (perhaps because the same code was used for
enums). With this change, Clippy will check the field’s effective
visibility only.

Note: This change is large because some functions were moved into an
`impl` to be able to access more configuration. Consider viewing the
diff with whitespace ignored.

changelog: [`struct_field_names`]: also check private fields of public
structs
Diffstat (limited to 'compiler/rustc_pattern_analysis/src/errors.rs')
0 files changed, 0 insertions, 0 deletions