Skip to content

Commit 6dab55c

Browse files
committed
Add bound_fn_sig
1 parent cc0607a commit 6dab55c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clippy_utils/src/ty.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use rustc_lint::LateContext;
1313
use rustc_middle::mir::interpret::{ConstValue, Scalar};
1414
use rustc_middle::ty::subst::{GenericArg, GenericArgKind, Subst};
1515
use rustc_middle::ty::{
16-
self, AdtDef, Binder, EarlyBinder, FnSig, IntTy, Predicate, PredicateKind, Ty, TyCtxt, TypeFoldable, UintTy, VariantDiscr,
16+
self, AdtDef, Binder, FnSig, IntTy, Predicate, PredicateKind, Ty, TyCtxt, TypeFoldable, UintTy, VariantDiscr,
1717
};
1818
use rustc_span::symbol::Ident;
1919
use rustc_span::{sym, Span, Symbol, DUMMY_SP};
@@ -520,7 +520,7 @@ pub fn expr_sig<'tcx>(cx: &LateContext<'tcx>, expr: &Expr<'_>) -> Option<ExprFnS
520520
let ty = cx.typeck_results().expr_ty_adjusted(expr).peel_refs();
521521
match *ty.kind() {
522522
ty::Closure(_, subs) => Some(ExprFnSig::Closure(subs.as_closure().sig())),
523-
ty::FnDef(id, subs) => Some(ExprFnSig::Sig(EarlyBinder(cx.tcx.fn_sig(id)).subst(cx.tcx, subs))),
523+
ty::FnDef(id, subs) => Some(ExprFnSig::Sig(cx.tcx.bound_fn_sig(id).subst(cx.tcx, subs))),
524524
ty::FnPtr(sig) => Some(ExprFnSig::Sig(sig)),
525525
ty::Dynamic(bounds, _) => {
526526
let lang_items = cx.tcx.lang_items();

0 commit comments

Comments
 (0)