@@ -2299,14 +2299,14 @@ impl<'o, 'tcx> dyn HirTyLowerer<'tcx> + 'o {
22992299
23002300 /// Parses the programmer's textual representation of a type into our
23012301 /// internal notion of a type.
2302- pub fn lower_ty ( & self , ast_ty : & hir:: Ty < ' tcx > ) -> Ty < ' tcx > {
2303- self . lower_ty_inner ( ast_ty , false , false )
2302+ pub fn lower_ty ( & self , hir_ty : & hir:: Ty < ' tcx > ) -> Ty < ' tcx > {
2303+ self . lower_ty_inner ( hir_ty , false , false )
23042304 }
23052305
23062306 /// Parses the programmer's textual representation of a type into our
23072307 /// internal notion of a type. This is meant to be used within a path.
2308- pub fn lower_ty_in_path ( & self , ast_ty : & hir:: Ty < ' tcx > ) -> Ty < ' tcx > {
2309- self . lower_ty_inner ( ast_ty , false , true )
2308+ pub fn lower_ty_in_path ( & self , hir_ty : & hir:: Ty < ' tcx > ) -> Ty < ' tcx > {
2309+ self . lower_ty_inner ( hir_ty , false , true )
23102310 }
23112311
23122312 fn check_delegation_constraints ( & self , sig_id : DefId , span : Span , emit : bool ) -> bool {
@@ -2422,12 +2422,12 @@ impl<'o, 'tcx> dyn HirTyLowerer<'tcx> + 'o {
24222422 /// For diagnostics' purposes we keep track of whether trait objects are
24232423 /// borrowed like `&dyn Trait` to avoid emitting redundant errors.
24242424 #[ instrument( level = "debug" , skip( self ) , ret) ]
2425- fn lower_ty_inner ( & self , ast_ty : & hir:: Ty < ' tcx > , borrowed : bool , in_path : bool ) -> Ty < ' tcx > {
2425+ fn lower_ty_inner ( & self , hir_ty : & hir:: Ty < ' tcx > , borrowed : bool , in_path : bool ) -> Ty < ' tcx > {
24262426 let tcx = self . tcx ( ) ;
24272427
2428- let result_ty = match & ast_ty . kind {
2428+ let result_ty = match & hir_ty . kind {
24292429 hir:: TyKind :: InferDelegation ( sig_id, idx) => {
2430- self . lower_delegation_ty ( * sig_id, * idx, ast_ty . span )
2430+ self . lower_delegation_ty ( * sig_id, * idx, hir_ty . span )
24312431 }
24322432 hir:: TyKind :: Slice ( ty) => Ty :: new_slice ( tcx, self . lower_ty ( ty) ) ,
24332433 hir:: TyKind :: Ptr ( mt) => {
@@ -2444,30 +2444,30 @@ impl<'o, 'tcx> dyn HirTyLowerer<'tcx> + 'o {
24442444 Ty :: new_tup_from_iter ( tcx, fields. iter ( ) . map ( |t| self . lower_ty ( t) ) )
24452445 }
24462446 hir:: TyKind :: BareFn ( bf) => {
2447- require_c_abi_if_c_variadic ( tcx, bf. decl , bf. abi , ast_ty . span ) ;
2447+ require_c_abi_if_c_variadic ( tcx, bf. decl , bf. abi , hir_ty . span ) ;
24482448
24492449 Ty :: new_fn_ptr (
24502450 tcx,
24512451 self . lower_fn_ty (
2452- ast_ty . hir_id ,
2452+ hir_ty . hir_id ,
24532453 bf. unsafety ,
24542454 bf. abi ,
24552455 bf. decl ,
24562456 None ,
2457- Some ( ast_ty ) ,
2457+ Some ( hir_ty ) ,
24582458 ) ,
24592459 )
24602460 }
24612461 hir:: TyKind :: TraitObject ( bounds, lifetime, repr) => {
2462- self . maybe_lint_bare_trait ( ast_ty , in_path) ;
2462+ self . maybe_lint_bare_trait ( hir_ty , in_path) ;
24632463 let repr = match repr {
24642464 TraitObjectSyntax :: Dyn | TraitObjectSyntax :: None => ty:: Dyn ,
24652465 TraitObjectSyntax :: DynStar => ty:: DynStar ,
24662466 } ;
24672467
24682468 self . lower_object_ty_to_poly_trait_ref (
2469- ast_ty . span ,
2470- ast_ty . hir_id ,
2469+ hir_ty . span ,
2470+ hir_ty . hir_id ,
24712471 bounds,
24722472 lifetime,
24732473 borrowed,
@@ -2477,7 +2477,7 @@ impl<'o, 'tcx> dyn HirTyLowerer<'tcx> + 'o {
24772477 hir:: TyKind :: Path ( hir:: QPath :: Resolved ( maybe_qself, path) ) => {
24782478 debug ! ( ?maybe_qself, ?path) ;
24792479 let opt_self_ty = maybe_qself. as_ref ( ) . map ( |qself| self . lower_ty ( qself) ) ;
2480- self . lower_res_to_ty ( opt_self_ty, path, ast_ty . hir_id , false )
2480+ self . lower_res_to_ty ( opt_self_ty, path, hir_ty . hir_id , false )
24812481 }
24822482 & hir:: TyKind :: OpaqueDef ( item_id, lifetimes, in_trait) => {
24832483 let opaque_ty = tcx. hir ( ) . item ( item_id) ;
@@ -2501,7 +2501,7 @@ impl<'o, 'tcx> dyn HirTyLowerer<'tcx> + 'o {
25012501 hir:: TyKind :: Path ( hir:: QPath :: TypeRelative ( qself, segment) ) => {
25022502 debug ! ( ?qself, ?segment) ;
25032503 let ty = self . lower_ty_inner ( qself, false , true ) ;
2504- self . lower_assoc_path_to_ty ( ast_ty . hir_id , ast_ty . span , ty, qself, segment, false )
2504+ self . lower_assoc_path_to_ty ( hir_ty . hir_id , hir_ty . span , ty, qself, segment, false )
25052505 . map ( |( ty, _, _) | ty)
25062506 . unwrap_or_else ( |guar| Ty :: new_error ( tcx, guar) )
25072507 }
@@ -2535,12 +2535,12 @@ impl<'o, 'tcx> dyn HirTyLowerer<'tcx> + 'o {
25352535 // values in an ExprKind::Closure, or as
25362536 // the type of local variables. Both of these cases are
25372537 // handled specially and will not descend into this routine.
2538- self . ty_infer ( None , ast_ty . span )
2538+ self . ty_infer ( None , hir_ty . span )
25392539 }
25402540 hir:: TyKind :: Err ( guar) => Ty :: new_error ( tcx, * guar) ,
25412541 } ;
25422542
2543- self . record_ty ( ast_ty . hir_id , result_ty, ast_ty . span ) ;
2543+ self . record_ty ( hir_ty . hir_id , result_ty, hir_ty . span ) ;
25442544 result_ty
25452545 }
25462546
0 commit comments