diff --git a/book/src/lint_configuration.md b/book/src/lint_configuration.md index 99853f8bc2b..27680467877 100644 --- a/book/src/lint_configuration.md +++ b/book/src/lint_configuration.md @@ -808,10 +808,10 @@ Whether to also run the listed lints on private items. ## `pub-underscore-fields-behavior` -Meow "public" fields in a struct that are prefixed with an underscore based on their +Lint "public" fields in a struct that are prefixed with an underscore based on their exported visibility, or whether they are marked as "pub". -**Default Value:** `"PublicallyExported"` +**Default Value:** `"PubliclyExported"` --- **Affected lints:** diff --git a/clippy_config/src/conf.rs b/clippy_config/src/conf.rs index e68969137d0..25a3467b377 100644 --- a/clippy_config/src/conf.rs +++ b/clippy_config/src/conf.rs @@ -551,7 +551,7 @@ pub fn get_configuration_metadata() -> Vec { /// /// Lint "public" fields in a struct that are prefixed with an underscore based on their /// exported visibility, or whether they are marked as "pub". - (pub_underscore_fields_behavior: PubUnderscoreFieldsBehaviour = PubUnderscoreFieldsBehaviour::PublicallyExported), + (pub_underscore_fields_behavior: PubUnderscoreFieldsBehaviour = PubUnderscoreFieldsBehaviour::PubliclyExported), } /// Search for the configuration file. diff --git a/clippy_config/src/types.rs b/clippy_config/src/types.rs index baee09629ac..435aa9244c5 100644 --- a/clippy_config/src/types.rs +++ b/clippy_config/src/types.rs @@ -129,6 +129,6 @@ fn serialize(&self, _serializer: S) -> Result #[derive(Clone, Copy, Debug, PartialEq, Eq, Deserialize, Serialize)] pub enum PubUnderscoreFieldsBehaviour { - PublicallyExported, + PubliclyExported, AllPubFields, } diff --git a/clippy_lints/src/pub_underscore_fields.rs b/clippy_lints/src/pub_underscore_fields.rs index 00465ce4381..88b5a6cfe2a 100644 --- a/clippy_lints/src/pub_underscore_fields.rs +++ b/clippy_lints/src/pub_underscore_fields.rs @@ -54,7 +54,7 @@ fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'_>) { }; let is_visible = |field: &FieldDef<'_>| match self.behavior { - PubUnderscoreFieldsBehaviour::PublicallyExported => cx.effective_visibilities.is_reachable(field.def_id), + PubUnderscoreFieldsBehaviour::PubliclyExported => cx.effective_visibilities.is_reachable(field.def_id), PubUnderscoreFieldsBehaviour::AllPubFields => { // If there is a visibility span then the field is marked pub in some way. !field.vis_span.is_empty() diff --git a/tests/ui-toml/pub_underscore_fields/exported/clippy.toml b/tests/ui-toml/pub_underscore_fields/exported/clippy.toml index 94a0d3554bc..2b79cbd46e4 100644 --- a/tests/ui-toml/pub_underscore_fields/exported/clippy.toml +++ b/tests/ui-toml/pub_underscore_fields/exported/clippy.toml @@ -1 +1 @@ -pub-underscore-fields-behavior = "PublicallyExported" \ No newline at end of file +pub-underscore-fields-behavior = "PubliclyExported" \ No newline at end of file