@@ -2302,14 +2302,14 @@ impl<'o, 'tcx> dyn HirTyLowerer<'tcx> + 'o {
23022302
23032303 /// Parses the programmer's textual representation of a type into our
23042304 /// internal notion of a type.
2305- pub fn lower_ty ( & self , ast_ty : & hir:: Ty < ' tcx > ) -> Ty < ' tcx > {
2306- self . lower_ty_inner ( ast_ty , false , false )
2305+ pub fn lower_ty ( & self , hir_ty : & hir:: Ty < ' tcx > ) -> Ty < ' tcx > {
2306+ self . lower_ty_inner ( hir_ty , false , false )
23072307 }
23082308
23092309 /// Parses the programmer's textual representation of a type into our
23102310 /// internal notion of a type. This is meant to be used within a path.
2311- pub fn lower_ty_in_path ( & self , ast_ty : & hir:: Ty < ' tcx > ) -> Ty < ' tcx > {
2312- self . lower_ty_inner ( ast_ty , false , true )
2311+ pub fn lower_ty_in_path ( & self , hir_ty : & hir:: Ty < ' tcx > ) -> Ty < ' tcx > {
2312+ self . lower_ty_inner ( hir_ty , false , true )
23132313 }
23142314
23152315 fn check_delegation_constraints ( & self , sig_id : DefId , span : Span , emit : bool ) -> bool {
@@ -2425,12 +2425,12 @@ impl<'o, 'tcx> dyn HirTyLowerer<'tcx> + 'o {
24252425 /// For diagnostics' purposes we keep track of whether trait objects are
24262426 /// borrowed like `&dyn Trait` to avoid emitting redundant errors.
24272427 #[ instrument( level = "debug" , skip( self ) , ret) ]
2428- fn lower_ty_inner ( & self , ast_ty : & hir:: Ty < ' tcx > , borrowed : bool , in_path : bool ) -> Ty < ' tcx > {
2428+ fn lower_ty_inner ( & self , hir_ty : & hir:: Ty < ' tcx > , borrowed : bool , in_path : bool ) -> Ty < ' tcx > {
24292429 let tcx = self . tcx ( ) ;
24302430
2431- let result_ty = match & ast_ty . kind {
2431+ let result_ty = match & hir_ty . kind {
24322432 hir:: TyKind :: InferDelegation ( sig_id, idx) => {
2433- self . lower_delegation_ty ( * sig_id, * idx, ast_ty . span )
2433+ self . lower_delegation_ty ( * sig_id, * idx, hir_ty . span )
24342434 }
24352435 hir:: TyKind :: Slice ( ty) => Ty :: new_slice ( tcx, self . lower_ty ( ty) ) ,
24362436 hir:: TyKind :: Ptr ( mt) => {
@@ -2460,30 +2460,30 @@ impl<'o, 'tcx> dyn HirTyLowerer<'tcx> + 'o {
24602460 Ty :: new_adt ( tcx, adt_def, tcx. mk_args ( args) )
24612461 }
24622462 hir:: TyKind :: BareFn ( bf) => {
2463- require_c_abi_if_c_variadic ( tcx, bf. decl , bf. abi , ast_ty . span ) ;
2463+ require_c_abi_if_c_variadic ( tcx, bf. decl , bf. abi , hir_ty . span ) ;
24642464
24652465 Ty :: new_fn_ptr (
24662466 tcx,
24672467 self . lower_fn_ty (
2468- ast_ty . hir_id ,
2468+ hir_ty . hir_id ,
24692469 bf. unsafety ,
24702470 bf. abi ,
24712471 bf. decl ,
24722472 None ,
2473- Some ( ast_ty ) ,
2473+ Some ( hir_ty ) ,
24742474 ) ,
24752475 )
24762476 }
24772477 hir:: TyKind :: TraitObject ( bounds, lifetime, repr) => {
2478- self . maybe_lint_bare_trait ( ast_ty , in_path) ;
2478+ self . maybe_lint_bare_trait ( hir_ty , in_path) ;
24792479 let repr = match repr {
24802480 TraitObjectSyntax :: Dyn | TraitObjectSyntax :: None => ty:: Dyn ,
24812481 TraitObjectSyntax :: DynStar => ty:: DynStar ,
24822482 } ;
24832483
24842484 self . lower_object_ty_to_poly_trait_ref (
2485- ast_ty . span ,
2486- ast_ty . hir_id ,
2485+ hir_ty . span ,
2486+ hir_ty . hir_id ,
24872487 bounds,
24882488 lifetime,
24892489 borrowed,
@@ -2493,7 +2493,7 @@ impl<'o, 'tcx> dyn HirTyLowerer<'tcx> + 'o {
24932493 hir:: TyKind :: Path ( hir:: QPath :: Resolved ( maybe_qself, path) ) => {
24942494 debug ! ( ?maybe_qself, ?path) ;
24952495 let opt_self_ty = maybe_qself. as_ref ( ) . map ( |qself| self . lower_ty ( qself) ) ;
2496- self . lower_res_to_ty ( opt_self_ty, path, ast_ty . hir_id , false )
2496+ self . lower_res_to_ty ( opt_self_ty, path, hir_ty . hir_id , false )
24972497 }
24982498 & hir:: TyKind :: OpaqueDef ( item_id, lifetimes, in_trait) => {
24992499 let opaque_ty = tcx. hir ( ) . item ( item_id) ;
@@ -2517,7 +2517,7 @@ impl<'o, 'tcx> dyn HirTyLowerer<'tcx> + 'o {
25172517 hir:: TyKind :: Path ( hir:: QPath :: TypeRelative ( qself, segment) ) => {
25182518 debug ! ( ?qself, ?segment) ;
25192519 let ty = self . lower_ty_inner ( qself, false , true ) ;
2520- self . lower_assoc_path_to_ty ( ast_ty . hir_id , ast_ty . span , ty, qself, segment, false )
2520+ self . lower_assoc_path_to_ty ( hir_ty . hir_id , hir_ty . span , ty, qself, segment, false )
25212521 . map ( |( ty, _, _) | ty)
25222522 . unwrap_or_else ( |guar| Ty :: new_error ( tcx, guar) )
25232523 }
@@ -2551,12 +2551,12 @@ impl<'o, 'tcx> dyn HirTyLowerer<'tcx> + 'o {
25512551 // values in an ExprKind::Closure, or as
25522552 // the type of local variables. Both of these cases are
25532553 // handled specially and will not descend into this routine.
2554- self . ty_infer ( None , ast_ty . span )
2554+ self . ty_infer ( None , hir_ty . span )
25552555 }
25562556 hir:: TyKind :: Err ( guar) => Ty :: new_error ( tcx, * guar) ,
25572557 } ;
25582558
2559- self . record_ty ( ast_ty . hir_id , result_ty, ast_ty . span ) ;
2559+ self . record_ty ( hir_ty . hir_id , result_ty, hir_ty . span ) ;
25602560 result_ty
25612561 }
25622562
0 commit comments