@@ -2402,7 +2402,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
24022402 hir:: TyKind :: Tup ( fields) => {
24032403 Ty :: new_tup_from_iter ( tcx, fields. iter ( ) . map ( |t| self . lower_ty ( t) ) )
24042404 }
2405- hir:: TyKind :: BareFn ( bf) => {
2405+ hir:: TyKind :: FnPtr ( bf) => {
24062406 require_c_abi_if_c_variadic ( tcx, bf. decl , bf. abi , hir_ty. span ) ;
24072407
24082408 Ty :: new_fn_ptr (
@@ -2660,28 +2660,28 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
26602660 debug ! ( ?output_ty) ;
26612661
26622662 let fn_ty = tcx. mk_fn_sig ( input_tys, output_ty, decl. c_variadic , safety, abi) ;
2663- let bare_fn_ty = ty:: Binder :: bind_with_vars ( fn_ty, bound_vars) ;
2663+ let fn_ptr_ty = ty:: Binder :: bind_with_vars ( fn_ty, bound_vars) ;
26642664
2665- if let hir:: Node :: Ty ( hir:: Ty { kind : hir:: TyKind :: BareFn ( bare_fn_ty ) , span, .. } ) =
2665+ if let hir:: Node :: Ty ( hir:: Ty { kind : hir:: TyKind :: FnPtr ( fn_ptr_ty ) , span, .. } ) =
26662666 tcx. hir_node ( hir_id)
26672667 {
2668- check_abi ( tcx, hir_id, * span, bare_fn_ty . abi ) ;
2668+ check_abi ( tcx, hir_id, * span, fn_ptr_ty . abi ) ;
26692669 }
26702670
26712671 // reject function types that violate cmse ABI requirements
2672- cmse:: validate_cmse_abi ( self . tcx ( ) , self . dcx ( ) , hir_id, abi, bare_fn_ty ) ;
2672+ cmse:: validate_cmse_abi ( self . tcx ( ) , self . dcx ( ) , hir_id, abi, fn_ptr_ty ) ;
26732673
2674- if !bare_fn_ty . references_error ( ) {
2674+ if !fn_ptr_ty . references_error ( ) {
26752675 // Find any late-bound regions declared in return type that do
26762676 // not appear in the arguments. These are not well-formed.
26772677 //
26782678 // Example:
26792679 // for<'a> fn() -> &'a str <-- 'a is bad
26802680 // for<'a> fn(&'a String) -> &'a str <-- 'a is ok
2681- let inputs = bare_fn_ty . inputs ( ) ;
2681+ let inputs = fn_ptr_ty . inputs ( ) ;
26822682 let late_bound_in_args =
26832683 tcx. collect_constrained_late_bound_regions ( inputs. map_bound ( |i| i. to_owned ( ) ) ) ;
2684- let output = bare_fn_ty . output ( ) ;
2684+ let output = fn_ptr_ty . output ( ) ;
26852685 let late_bound_in_ret = tcx. collect_referenced_late_bound_regions ( output) ;
26862686
26872687 self . validate_late_bound_regions ( late_bound_in_args, late_bound_in_ret, |br_name| {
@@ -2695,7 +2695,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
26952695 } ) ;
26962696 }
26972697
2698- bare_fn_ty
2698+ fn_ptr_ty
26992699 }
27002700
27012701 /// Given a fn_hir_id for a impl function, suggest the type that is found on the
0 commit comments