diff options
| author | Kyle Matsuda <kyle.yoshio.matsuda@gmail.com> | 2023-01-17 08:54:07 -0700 |
|---|---|---|
| committer | Kyle Matsuda <kyle.yoshio.matsuda@gmail.com> | 2023-01-17 08:55:28 -0700 |
| commit | f193effcaf421da090a463a49968b7bac849db2f (patch) | |
| tree | efcd7c38807cec1107f907f78902859cd4aebcf8 /src/tools | |
| parent | fc942eed7fc0c8f08ff223a72a3583b93aadea99 (diff) | |
| download | rust-f193effcaf421da090a463a49968b7bac849db2f.tar.gz rust-f193effcaf421da090a463a49968b7bac849db2f.zip | |
fix missing subst in clippy utils
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/clippy/clippy_utils/src/ty.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/clippy/clippy_utils/src/ty.rs b/src/tools/clippy/clippy_utils/src/ty.rs index 1d2a469ca6c..99fba4fe741 100644 --- a/src/tools/clippy/clippy_utils/src/ty.rs +++ b/src/tools/clippy/clippy_utils/src/ty.rs @@ -647,8 +647,8 @@ pub fn ty_sig<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>) -> Option<ExprFnSig<'t Some(ExprFnSig::Closure(decl, subs.as_closure().sig())) }, ty::FnDef(id, subs) => Some(ExprFnSig::Sig(cx.tcx.bound_fn_sig(id).subst(cx.tcx, subs), Some(id))), - ty::Alias(ty::Opaque, ty::AliasTy { def_id, .. }) => { - sig_from_bounds(cx, ty, cx.tcx.item_bounds(def_id).subst_identity(), cx.tcx.opt_parent(def_id)) + ty::Alias(ty::Opaque, ty::AliasTy { def_id, substs, .. }) => { + sig_from_bounds(cx, ty, cx.tcx.item_bounds(def_id).subst(cx.tcx, substs), cx.tcx.opt_parent(def_id)) }, ty::FnPtr(sig) => Some(ExprFnSig::Sig(sig, None)), ty::Dynamic(bounds, _, _) => { |
