@@ -759,7 +759,7 @@ fn walk_parents<'tcx>(
759
759
} ) if span. ctxt ( ) == ctxt => {
760
760
let output = cx
761
761
. 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 ( ) ) ;
763
763
Some ( ty_auto_deref_stability ( cx, output, precedence) . position_for_result ( cx) )
764
764
} ,
765
765
@@ -791,7 +791,7 @@ fn walk_parents<'tcx>(
791
791
} else {
792
792
let output = cx
793
793
. 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 ( ) ) ;
795
795
ty_auto_deref_stability ( cx, output, precedence) . position_for_result ( cx)
796
796
} ,
797
797
)
@@ -858,7 +858,7 @@ fn walk_parents<'tcx>(
858
858
&& let subs = cx
859
859
. typeck_results ( )
860
860
. 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 ( ) {
862
862
// Trait methods taking `&self`
863
863
sub_ty
864
864
} else {
@@ -879,7 +879,7 @@ fn walk_parents<'tcx>(
879
879
return Some ( Position :: MethodReceiver ) ;
880
880
}
881
881
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 ] ;
883
883
// `e.hir_id == child_id` for https://github.com/rust-lang/rust-clippy/issues/9739
884
884
// `method.args.is_none()` for https://github.com/rust-lang/rust-clippy/issues/9782
885
885
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>(
896
896
} else {
897
897
ty_auto_deref_stability (
898
898
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 ) ) ,
900
900
precedence,
901
901
)
902
902
. position_for_arg ( )
@@ -1093,7 +1093,7 @@ fn needless_borrow_impl_arg_position<'tcx>(
1093
1093
let sized_trait_def_id = cx. tcx . lang_items ( ) . sized_trait ( ) ;
1094
1094
1095
1095
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 ( ) ;
1097
1097
let substs_with_expr_ty = cx
1098
1098
. typeck_results ( )
1099
1099
. 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 {
1221
1221
. in_definition_order ( )
1222
1222
. any ( |assoc_item| {
1223
1223
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 ] ;
1225
1225
matches ! ( self_ty. kind( ) , ty:: Ref ( _, _, Mutability :: Mut ) )
1226
1226
} else {
1227
1227
false
0 commit comments