Change PublicallyExported
-> PubliclyExported
This commit is contained in:
parent
2469784cb6
commit
44f5d969d5
@ -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:**
|
||||
|
@ -551,7 +551,7 @@ pub fn get_configuration_metadata() -> Vec<ClippyConfiguration> {
|
||||
///
|
||||
/// 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.
|
||||
|
@ -129,6 +129,6 @@ fn serialize<S>(&self, _serializer: S) -> Result<S::Ok, S::Error>
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Deserialize, Serialize)]
|
||||
pub enum PubUnderscoreFieldsBehaviour {
|
||||
PublicallyExported,
|
||||
PubliclyExported,
|
||||
AllPubFields,
|
||||
}
|
||||
|
@ -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()
|
||||
|
@ -1 +1 @@
|
||||
pub-underscore-fields-behavior = "PublicallyExported"
|
||||
pub-underscore-fields-behavior = "PubliclyExported"
|
Loading…
Reference in New Issue
Block a user