@@ -1285,7 +1285,7 @@ impl<'a> LoweringContext<'a> {
12851285 name : keywords:: Invalid . name ( ) ,
12861286 attrs : Default :: default ( ) ,
12871287 node : exist_ty_item_kind,
1288- vis : respan ( span. shrink_to_lo ( ) , hir:: VisibilityInherited ) ,
1288+ vis : respan ( span. shrink_to_lo ( ) , hir:: VisibilityKind :: Inherited ) ,
12891289 span : exist_ty_span,
12901290 } ;
12911291
@@ -2771,11 +2771,11 @@ impl<'a> LoweringContext<'a> {
27712771 let path = this. lower_path_extra ( def, & path, None , ParamMode :: Explicit ) ;
27722772 let item = hir:: ItemUse ( P ( path) , hir:: UseKind :: Single ) ;
27732773 let vis_kind = match vis. node {
2774- hir:: VisibilityPublic => hir:: VisibilityPublic ,
2775- hir:: VisibilityCrate ( sugar) => hir:: VisibilityCrate ( sugar) ,
2776- hir:: VisibilityInherited => hir:: VisibilityInherited ,
2777- hir:: VisibilityRestricted { ref path, id : _ } => {
2778- hir:: VisibilityRestricted {
2774+ hir:: VisibilityKind :: Public => hir:: VisibilityKind :: Public ,
2775+ hir:: VisibilityKind :: Crate ( sugar) => hir:: VisibilityKind :: Crate ( sugar) ,
2776+ hir:: VisibilityKind :: Inherited => hir:: VisibilityKind :: Inherited ,
2777+ hir:: VisibilityKind :: Restricted { ref path, id : _ } => {
2778+ hir:: VisibilityKind :: Restricted {
27792779 path : path. clone ( ) ,
27802780 // We are allocating a new NodeId here
27812781 id : this. next_id ( ) . node_id ,
@@ -2844,11 +2844,11 @@ impl<'a> LoweringContext<'a> {
28442844
28452845 self . with_hir_id_owner ( new_id, |this| {
28462846 let vis_kind = match vis. node {
2847- hir:: VisibilityPublic => hir:: VisibilityPublic ,
2848- hir:: VisibilityCrate ( sugar) => hir:: VisibilityCrate ( sugar) ,
2849- hir:: VisibilityInherited => hir:: VisibilityInherited ,
2850- hir:: VisibilityRestricted { ref path, id : _ } => {
2851- hir:: VisibilityRestricted {
2847+ hir:: VisibilityKind :: Public => hir:: VisibilityKind :: Public ,
2848+ hir:: VisibilityKind :: Crate ( sugar) => hir:: VisibilityKind :: Crate ( sugar) ,
2849+ hir:: VisibilityKind :: Inherited => hir:: VisibilityKind :: Inherited ,
2850+ hir:: VisibilityKind :: Restricted { ref path, id : _ } => {
2851+ hir:: VisibilityKind :: Restricted {
28522852 path : path. clone ( ) ,
28532853 // We are allocating a new NodeId here
28542854 id : this. next_id ( ) . node_id ,
@@ -2876,7 +2876,7 @@ impl<'a> LoweringContext<'a> {
28762876 // the stability of `use a::{};`, to avoid it showing up as
28772877 // a re-export by accident when `pub`, e.g. in documentation.
28782878 let path = P ( self . lower_path ( id, & prefix, ParamMode :: Explicit ) ) ;
2879- * vis = respan ( prefix. span . shrink_to_lo ( ) , hir:: VisibilityInherited ) ;
2879+ * vis = respan ( prefix. span . shrink_to_lo ( ) , hir:: VisibilityKind :: Inherited ) ;
28802880 hir:: ItemUse ( path, hir:: UseKind :: ListStem )
28812881 }
28822882 }
@@ -4277,17 +4277,17 @@ impl<'a> LoweringContext<'a> {
42774277 explicit_owner : Option < NodeId > ,
42784278 ) -> hir:: Visibility {
42794279 let node = match v. node {
4280- VisibilityKind :: Public => hir:: VisibilityPublic ,
4281- VisibilityKind :: Crate ( sugar) => hir:: VisibilityCrate ( sugar) ,
4282- VisibilityKind :: Restricted { ref path, id } => hir:: VisibilityRestricted {
4280+ VisibilityKind :: Public => hir:: VisibilityKind :: Public ,
4281+ VisibilityKind :: Crate ( sugar) => hir:: VisibilityKind :: Crate ( sugar) ,
4282+ VisibilityKind :: Restricted { ref path, id } => hir:: VisibilityKind :: Restricted {
42834283 path : P ( self . lower_path ( id, path, ParamMode :: Explicit ) ) ,
42844284 id : if let Some ( owner) = explicit_owner {
42854285 self . lower_node_id_with_owner ( id, owner) . node_id
42864286 } else {
42874287 self . lower_node_id ( id) . node_id
42884288 } ,
42894289 } ,
4290- VisibilityKind :: Inherited => hir:: VisibilityInherited ,
4290+ VisibilityKind :: Inherited => hir:: VisibilityKind :: Inherited ,
42914291 } ;
42924292 respan ( v. span , node)
42934293 }
0 commit comments