@@ -1080,25 +1080,25 @@ impl<'a> LoweringContext<'a> {
10801080
10811081 fn lower_ty_direct ( & mut self , t : & Ty , mut itctx : ImplTraitContext ) -> hir:: Ty {
10821082 let kind = match t. node {
1083- TyKind :: Infer => hir:: TyInfer ,
1084- TyKind :: Err => hir:: TyErr ,
1085- TyKind :: Slice ( ref ty) => hir:: TySlice ( self . lower_ty ( ty, itctx) ) ,
1086- TyKind :: Ptr ( ref mt) => hir:: TyPtr ( self . lower_mt ( mt, itctx) ) ,
1083+ TyKind :: Infer => hir:: TyKind :: Infer ,
1084+ TyKind :: Err => hir:: TyKind :: Err ,
1085+ TyKind :: Slice ( ref ty) => hir:: TyKind :: Slice ( self . lower_ty ( ty, itctx) ) ,
1086+ TyKind :: Ptr ( ref mt) => hir:: TyKind :: Ptr ( self . lower_mt ( mt, itctx) ) ,
10871087 TyKind :: Rptr ( ref region, ref mt) => {
10881088 let span = t. span . shrink_to_lo ( ) ;
10891089 let lifetime = match * region {
10901090 Some ( ref lt) => self . lower_lifetime ( lt) ,
10911091 None => self . elided_ref_lifetime ( span) ,
10921092 } ;
1093- hir:: TyRptr ( lifetime, self . lower_mt ( mt, itctx) )
1093+ hir:: TyKind :: Rptr ( lifetime, self . lower_mt ( mt, itctx) )
10941094 }
10951095 TyKind :: BareFn ( ref f) => self . with_in_scope_lifetime_defs (
10961096 & f. generic_params ,
10971097 |this| {
10981098 this. with_anonymous_lifetime_mode (
10991099 AnonymousLifetimeMode :: PassThrough ,
11001100 |this| {
1101- hir:: TyBareFn ( P ( hir:: BareFnTy {
1101+ hir:: TyKind :: BareFn ( P ( hir:: BareFnTy {
11021102 generic_params : this. lower_generic_params (
11031103 & f. generic_params ,
11041104 & NodeMap ( ) ,
@@ -1113,9 +1113,9 @@ impl<'a> LoweringContext<'a> {
11131113 )
11141114 } ,
11151115 ) ,
1116- TyKind :: Never => hir:: TyNever ,
1116+ TyKind :: Never => hir:: TyKind :: Never ,
11171117 TyKind :: Tup ( ref tys) => {
1118- hir:: TyTup ( tys. iter ( ) . map ( |ty| {
1118+ hir:: TyKind :: Tup ( tys. iter ( ) . map ( |ty| {
11191119 self . lower_ty_direct ( ty, itctx. reborrow ( ) )
11201120 } ) . collect ( ) )
11211121 }
@@ -1126,12 +1126,12 @@ impl<'a> LoweringContext<'a> {
11261126 let id = self . lower_node_id ( t. id ) ;
11271127 let qpath = self . lower_qpath ( t. id , qself, path, ParamMode :: Explicit , itctx) ;
11281128 let ty = self . ty_path ( id, t. span , qpath) ;
1129- if let hir:: TyTraitObject ( ..) = ty. node {
1129+ if let hir:: TyKind :: TraitObject ( ..) = ty. node {
11301130 self . maybe_lint_bare_trait ( t. span , t. id , qself. is_none ( ) && path. is_global ( ) ) ;
11311131 }
11321132 return ty;
11331133 }
1134- TyKind :: ImplicitSelf => hir:: TyPath ( hir:: QPath :: Resolved (
1134+ TyKind :: ImplicitSelf => hir:: TyKind :: Path ( hir:: QPath :: Resolved (
11351135 None ,
11361136 P ( hir:: Path {
11371137 def : self . expect_full_def ( t. id ) ,
@@ -1140,10 +1140,10 @@ impl<'a> LoweringContext<'a> {
11401140 } ) ,
11411141 ) ) ,
11421142 TyKind :: Array ( ref ty, ref length) => {
1143- hir:: TyArray ( self . lower_ty ( ty, itctx) , self . lower_anon_const ( length) )
1143+ hir:: TyKind :: Array ( self . lower_ty ( ty, itctx) , self . lower_anon_const ( length) )
11441144 }
11451145 TyKind :: Typeof ( ref expr) => {
1146- hir:: TyTypeof ( self . lower_anon_const ( expr) )
1146+ hir:: TyKind :: Typeof ( self . lower_anon_const ( expr) )
11471147 }
11481148 TyKind :: TraitObject ( ref bounds, kind) => {
11491149 let mut lifetime_bound = None ;
@@ -1167,7 +1167,7 @@ impl<'a> LoweringContext<'a> {
11671167 if kind != TraitObjectSyntax :: Dyn {
11681168 self . maybe_lint_bare_trait ( t. span , t. id , false ) ;
11691169 }
1170- hir:: TyTraitObject ( bounds, lifetime_bound)
1170+ hir:: TyKind :: TraitObject ( bounds, lifetime_bound)
11711171 }
11721172 TyKind :: ImplTrait ( def_node_id, ref bounds) => {
11731173 let span = t. span ;
@@ -1206,7 +1206,7 @@ impl<'a> LoweringContext<'a> {
12061206 }
12071207 } ) ;
12081208
1209- hir:: TyPath ( hir:: QPath :: Resolved (
1209+ hir:: TyKind :: Path ( hir:: QPath :: Resolved (
12101210 None ,
12111211 P ( hir:: Path {
12121212 span,
@@ -1223,7 +1223,7 @@ impl<'a> LoweringContext<'a> {
12231223 "`impl Trait` not allowed outside of function \
12241224 and inherent method return types"
12251225 ) ;
1226- hir:: TyErr
1226+ hir:: TyKind :: Err
12271227 }
12281228 }
12291229 }
@@ -1245,7 +1245,7 @@ impl<'a> LoweringContext<'a> {
12451245 fn_def_id : DefId ,
12461246 exist_ty_node_id : NodeId ,
12471247 lower_bounds : impl FnOnce ( & mut LoweringContext ) -> hir:: GenericBounds ,
1248- ) -> hir:: Ty_ {
1248+ ) -> hir:: TyKind {
12491249 // Make sure we know that some funky desugaring has been going on here.
12501250 // This is a first: there is code in other places like for loop
12511251 // desugaring that explicitly states that we don't want to track that.
@@ -1320,7 +1320,7 @@ impl<'a> LoweringContext<'a> {
13201320 } ) )
13211321 } ] ,
13221322 } ) ;
1323- hir:: TyPath ( hir:: QPath :: Resolved ( None , path) )
1323+ hir:: TyKind :: Path ( hir:: QPath :: Resolved ( None , path) )
13241324 } )
13251325 }
13261326
@@ -1365,7 +1365,7 @@ impl<'a> LoweringContext<'a> {
13651365
13661366 fn visit_ty ( & mut self , t : & ' v hir:: Ty ) {
13671367 // Don't collect elided lifetimes used inside of `fn()` syntax
1368- if let hir:: Ty_ :: TyBareFn ( _) = t. node {
1368+ if let hir:: TyKind :: BareFn ( _) = t. node {
13691369 let old_collect_elided_lifetimes = self . collect_elided_lifetimes ;
13701370 self . collect_elided_lifetimes = false ;
13711371
@@ -1805,7 +1805,7 @@ impl<'a> LoweringContext<'a> {
18051805 let inputs = inputs. iter ( ) . map ( |ty| this. lower_ty_direct ( ty, DISALLOWED ) ) . collect ( ) ;
18061806 let mk_tup = |this : & mut Self , tys, span| {
18071807 let LoweredNodeId { node_id, hir_id } = this. next_id ( ) ;
1808- hir:: Ty { node : hir:: TyTup ( tys) , id : node_id, hir_id, span }
1808+ hir:: Ty { node : hir:: TyKind :: Tup ( tys) , id : node_id, hir_id, span }
18091809 } ;
18101810
18111811 (
@@ -1985,7 +1985,7 @@ impl<'a> LoweringContext<'a> {
19851985
19861986 fn visit_ty ( & mut self , t : & ' v hir:: Ty ) {
19871987 // Don't collect elided lifetimes used inside of `fn()` syntax
1988- if let & hir:: Ty_ :: TyBareFn ( _) = & t. node {
1988+ if let & hir:: TyKind :: BareFn ( _) = & t. node {
19891989 let old_collect_elided_lifetimes = self . collect_elided_lifetimes ;
19901990 self . collect_elided_lifetimes = false ;
19911991
@@ -2105,7 +2105,7 @@ impl<'a> LoweringContext<'a> {
21052105 P ( hir:: Ty {
21062106 id : node_id,
21072107 hir_id : hir_id,
2108- node : hir:: TyTup ( hir_vec ! [ ] ) ,
2108+ node : hir:: TyKind :: Tup ( hir_vec ! [ ] ) ,
21092109 span : * span,
21102110 } )
21112111 }
@@ -4624,7 +4624,7 @@ impl<'a> LoweringContext<'a> {
46244624 let mut id = id;
46254625 let node = match qpath {
46264626 hir:: QPath :: Resolved ( None , path) => {
4627- // Turn trait object paths into `TyTraitObject ` instead.
4627+ // Turn trait object paths into `TyKind::TraitObject ` instead.
46284628 if let Def :: Trait ( _) = path. def {
46294629 let principal = hir:: PolyTraitRef {
46304630 bound_generic_params : hir:: HirVec :: new ( ) ,
@@ -4638,12 +4638,12 @@ impl<'a> LoweringContext<'a> {
46384638 // The original ID is taken by the `PolyTraitRef`,
46394639 // so the `Ty` itself needs a different one.
46404640 id = self . next_id ( ) ;
4641- hir:: TyTraitObject ( hir_vec ! [ principal] , self . elided_dyn_bound ( span) )
4641+ hir:: TyKind :: TraitObject ( hir_vec ! [ principal] , self . elided_dyn_bound ( span) )
46424642 } else {
4643- hir:: TyPath ( hir:: QPath :: Resolved ( None , path) )
4643+ hir:: TyKind :: Path ( hir:: QPath :: Resolved ( None , path) )
46444644 }
46454645 }
4646- _ => hir:: TyPath ( qpath) ,
4646+ _ => hir:: TyKind :: Path ( qpath) ,
46474647 } ;
46484648 hir:: Ty {
46494649 id : id. node_id ,
0 commit comments