@@ -20,14 +20,17 @@ use crate::{
2020pub enum RawVisibility {
2121 /// `pub(in module)`, `pub(crate)` or `pub(super)`. Also private, which is
2222 /// equivalent to `pub(self)`.
23- Module ( ModPath , VisibilityExplicity ) ,
23+ Module ( ModPath , VisibilityExplicitness ) ,
2424 /// `pub`.
2525 Public ,
2626}
2727
2828impl RawVisibility {
2929 pub ( crate ) const fn private ( ) -> RawVisibility {
30- RawVisibility :: Module ( ModPath :: from_kind ( PathKind :: Super ( 0 ) ) , VisibilityExplicity :: Implicit )
30+ RawVisibility :: Module (
31+ ModPath :: from_kind ( PathKind :: Super ( 0 ) ) ,
32+ VisibilityExplicitness :: Implicit ,
33+ )
3134 }
3235
3336 pub ( crate ) fn from_ast (
@@ -53,19 +56,19 @@ impl RawVisibility {
5356 None => return RawVisibility :: private ( ) ,
5457 Some ( path) => path,
5558 } ;
56- RawVisibility :: Module ( path, VisibilityExplicity :: Explicit )
59+ RawVisibility :: Module ( path, VisibilityExplicitness :: Explicit )
5760 }
5861 ast:: VisibilityKind :: PubCrate => {
5962 let path = ModPath :: from_kind ( PathKind :: Crate ) ;
60- RawVisibility :: Module ( path, VisibilityExplicity :: Explicit )
63+ RawVisibility :: Module ( path, VisibilityExplicitness :: Explicit )
6164 }
6265 ast:: VisibilityKind :: PubSuper => {
6366 let path = ModPath :: from_kind ( PathKind :: Super ( 1 ) ) ;
64- RawVisibility :: Module ( path, VisibilityExplicity :: Explicit )
67+ RawVisibility :: Module ( path, VisibilityExplicitness :: Explicit )
6568 }
6669 ast:: VisibilityKind :: PubSelf => {
6770 let path = ModPath :: from_kind ( PathKind :: Super ( 0 ) ) ;
68- RawVisibility :: Module ( path, VisibilityExplicity :: Explicit )
71+ RawVisibility :: Module ( path, VisibilityExplicitness :: Explicit )
6972 }
7073 ast:: VisibilityKind :: Pub => RawVisibility :: Public ,
7174 }
@@ -85,7 +88,7 @@ impl RawVisibility {
8588#[ derive( Debug , Copy , Clone , PartialEq , Eq , Hash ) ]
8689pub enum Visibility {
8790 /// Visibility is restricted to a certain module.
88- Module ( ModuleId , VisibilityExplicity ) ,
91+ Module ( ModuleId , VisibilityExplicitness ) ,
8992 /// Visibility is unrestricted.
9093 Public ,
9194}
@@ -206,12 +209,12 @@ impl Visibility {
206209
207210/// Whether the item was imported through `pub(crate) use` or just `use`.
208211#[ derive( Debug , Copy , Clone , PartialEq , Eq , Hash ) ]
209- pub enum VisibilityExplicity {
212+ pub enum VisibilityExplicitness {
210213 Explicit ,
211214 Implicit ,
212215}
213216
214- impl VisibilityExplicity {
217+ impl VisibilityExplicitness {
215218 pub fn is_explicit ( & self ) -> bool {
216219 matches ! ( self , Self :: Explicit )
217220 }
0 commit comments