mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
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 @@ define_Conf! {
|
||||
///
|
||||
/// 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 @@ unimplemented_serialize! {
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Deserialize, Serialize)]
|
||||
pub enum PubUnderscoreFieldsBehaviour {
|
||||
PublicallyExported,
|
||||
PubliclyExported,
|
||||
AllPubFields,
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ impl<'tcx> LateLintPass<'tcx> for PubUnderscoreFields {
|
||||
};
|
||||
|
||||
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