1
Fork 0

Replace tcx.mk_trait_ref with ty::TraitRef::new

This commit is contained in:
Maybe Waffle 2023-04-25 16:07:48 +00:00
parent 2d8c905e15
commit 46b01abbcd
41 changed files with 193 additions and 125 deletions

View file

@ -62,7 +62,7 @@ fn sized_constraint_for_ty<'tcx>(
// it on the impl.
let Some(sized_trait) = tcx.lang_items().sized_trait() else { return vec![ty] };
let sized_predicate = ty::Binder::dummy(tcx.mk_trait_ref(sized_trait, [ty]))
let sized_predicate = ty::Binder::dummy(ty::TraitRef::new(tcx, sized_trait, [ty]))
.without_const()
.to_predicate(tcx);
let predicates = tcx.predicates_of(adtdef.did()).predicates;