Replace more mk_foo calls with infer_foo.

This commit is contained in:
Nicholas Nethercote 2023-02-16 16:27:05 +11:00
parent 2017aeff88
commit 107f14d2ca
9 changed files with 18 additions and 24 deletions

View file

@ -564,10 +564,10 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
.into()
}
});
let bound_vars = tcx.mk_bound_variable_kinds(bound_vars.into_iter());
let bound_vars = tcx.intern_bound_variable_kinds(&bound_vars);
let assoc_ty_substs = tcx.intern_substs(&substs);
let bound_vars = tcx.mk_bound_variable_kinds(bound_vars.into_iter());
let bound_vars = tcx.intern_bound_variable_kinds(&bound_vars);
let bound =
bound.map_bound(|b| b.kind().skip_binder()).subst(tcx, assoc_ty_substs);
tcx.mk_predicate(ty::Binder::bind_with_vars(bound, bound_vars))