@@ -759,7 +759,7 @@ fn walk_parents<'tcx>(
759759 } ) if span. ctxt ( ) == ctxt => {
760760 let output = cx
761761 . tcx
762- . erase_late_bound_regions ( cx. tcx . bound_fn_sig ( owner_id. to_def_id ( ) ) . subst_identity ( ) . output ( ) ) ;
762+ . erase_late_bound_regions ( cx. tcx . fn_sig ( owner_id) . subst_identity ( ) . output ( ) ) ;
763763 Some ( ty_auto_deref_stability ( cx, output, precedence) . position_for_result ( cx) )
764764 } ,
765765
@@ -791,7 +791,7 @@ fn walk_parents<'tcx>(
791791 } else {
792792 let output = cx
793793 . tcx
794- . erase_late_bound_regions ( cx. tcx . bound_fn_sig ( cx. tcx . hir ( ) . local_def_id ( owner_id) . into ( ) ) . subst_identity ( ) . output ( ) ) ;
794+ . erase_late_bound_regions ( cx. tcx . fn_sig ( cx. tcx . hir ( ) . local_def_id ( owner_id) ) . subst_identity ( ) . output ( ) ) ;
795795 ty_auto_deref_stability ( cx, output, precedence) . position_for_result ( cx)
796796 } ,
797797 )
@@ -858,7 +858,7 @@ fn walk_parents<'tcx>(
858858 && let subs = cx
859859 . typeck_results ( )
860860 . node_substs_opt ( parent. hir_id ) . map ( |subs| & subs[ 1 ..] ) . unwrap_or_default ( )
861- && let impl_ty = if cx. tcx . bound_fn_sig ( id) . subst_identity ( ) . skip_binder ( ) . inputs ( ) [ 0 ] . is_ref ( ) {
861+ && let impl_ty = if cx. tcx . fn_sig ( id) . subst_identity ( ) . skip_binder ( ) . inputs ( ) [ 0 ] . is_ref ( ) {
862862 // Trait methods taking `&self`
863863 sub_ty
864864 } else {
@@ -879,7 +879,7 @@ fn walk_parents<'tcx>(
879879 return Some ( Position :: MethodReceiver ) ;
880880 }
881881 args. iter ( ) . position ( |arg| arg. hir_id == child_id) . map ( |i| {
882- let ty = cx. tcx . bound_fn_sig ( id) . subst_identity ( ) . skip_binder ( ) . inputs ( ) [ i + 1 ] ;
882+ let ty = cx. tcx . fn_sig ( id) . subst_identity ( ) . skip_binder ( ) . inputs ( ) [ i + 1 ] ;
883883 // `e.hir_id == child_id` for https://github.com/rust-lang/rust-clippy/issues/9739
884884 // `method.args.is_none()` for https://github.com/rust-lang/rust-clippy/issues/9782
885885 if e. hir_id == child_id && method. args . is_none ( ) && let ty:: Param ( param_ty) = ty. kind ( ) {
@@ -896,7 +896,7 @@ fn walk_parents<'tcx>(
896896 } else {
897897 ty_auto_deref_stability (
898898 cx,
899- cx. tcx . erase_late_bound_regions ( cx. tcx . bound_fn_sig ( id) . subst_identity ( ) . input ( i + 1 ) ) ,
899+ cx. tcx . erase_late_bound_regions ( cx. tcx . fn_sig ( id) . subst_identity ( ) . input ( i + 1 ) ) ,
900900 precedence,
901901 )
902902 . position_for_arg ( )
@@ -1093,7 +1093,7 @@ fn needless_borrow_impl_arg_position<'tcx>(
10931093 let sized_trait_def_id = cx. tcx . lang_items ( ) . sized_trait ( ) ;
10941094
10951095 let Some ( callee_def_id) = fn_def_id ( cx, parent) else { return Position :: Other ( precedence) } ;
1096- let fn_sig = cx. tcx . bound_fn_sig ( callee_def_id) . subst_identity ( ) . skip_binder ( ) ;
1096+ let fn_sig = cx. tcx . fn_sig ( callee_def_id) . subst_identity ( ) . skip_binder ( ) ;
10971097 let substs_with_expr_ty = cx
10981098 . typeck_results ( )
10991099 . node_substs ( if let ExprKind :: Call ( callee, _) = parent. kind {
@@ -1221,7 +1221,7 @@ fn has_ref_mut_self_method(cx: &LateContext<'_>, trait_def_id: DefId) -> bool {
12211221 . in_definition_order ( )
12221222 . any ( |assoc_item| {
12231223 if assoc_item. fn_has_self_parameter {
1224- let self_ty = cx. tcx . bound_fn_sig ( assoc_item. def_id ) . subst_identity ( ) . skip_binder ( ) . inputs ( ) [ 0 ] ;
1224+ let self_ty = cx. tcx . fn_sig ( assoc_item. def_id ) . subst_identity ( ) . skip_binder ( ) . inputs ( ) [ 0 ] ;
12251225 matches ! ( self_ty. kind( ) , ty:: Ref ( _, _, Mutability :: Mut ) )
12261226 } else {
12271227 false
0 commit comments