@@ -1285,7 +1285,7 @@ impl<'a> LoweringContext<'a> {
1285
1285
name : keywords:: Invalid . name ( ) ,
1286
1286
attrs : Default :: default ( ) ,
1287
1287
node : exist_ty_item_kind,
1288
- vis : respan ( span. shrink_to_lo ( ) , hir:: VisibilityInherited ) ,
1288
+ vis : respan ( span. shrink_to_lo ( ) , hir:: VisibilityKind :: Inherited ) ,
1289
1289
span : exist_ty_span,
1290
1290
} ;
1291
1291
@@ -2771,11 +2771,11 @@ impl<'a> LoweringContext<'a> {
2771
2771
let path = this. lower_path_extra ( def, & path, None , ParamMode :: Explicit ) ;
2772
2772
let item = hir:: ItemUse ( P ( path) , hir:: UseKind :: Single ) ;
2773
2773
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 {
2779
2779
path : path. clone ( ) ,
2780
2780
// We are allocating a new NodeId here
2781
2781
id : this. next_id ( ) . node_id ,
@@ -2844,11 +2844,11 @@ impl<'a> LoweringContext<'a> {
2844
2844
2845
2845
self . with_hir_id_owner ( new_id, |this| {
2846
2846
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 {
2852
2852
path : path. clone ( ) ,
2853
2853
// We are allocating a new NodeId here
2854
2854
id : this. next_id ( ) . node_id ,
@@ -2876,7 +2876,7 @@ impl<'a> LoweringContext<'a> {
2876
2876
// the stability of `use a::{};`, to avoid it showing up as
2877
2877
// a re-export by accident when `pub`, e.g. in documentation.
2878
2878
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 ) ;
2880
2880
hir:: ItemUse ( path, hir:: UseKind :: ListStem )
2881
2881
}
2882
2882
}
@@ -4277,17 +4277,17 @@ impl<'a> LoweringContext<'a> {
4277
4277
explicit_owner : Option < NodeId > ,
4278
4278
) -> hir:: Visibility {
4279
4279
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 {
4283
4283
path : P ( self . lower_path ( id, path, ParamMode :: Explicit ) ) ,
4284
4284
id : if let Some ( owner) = explicit_owner {
4285
4285
self . lower_node_id_with_owner ( id, owner) . node_id
4286
4286
} else {
4287
4287
self . lower_node_id ( id) . node_id
4288
4288
} ,
4289
4289
} ,
4290
- VisibilityKind :: Inherited => hir:: VisibilityInherited ,
4290
+ VisibilityKind :: Inherited => hir:: VisibilityKind :: Inherited ,
4291
4291
} ;
4292
4292
respan ( v. span , node)
4293
4293
}
0 commit comments