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

@ -157,8 +157,12 @@ impl Qualif for NeedsNonConstDrop {
cx.tcx,
ObligationCause::dummy_with_span(cx.body.span),
cx.param_env,
ty::Binder::dummy(cx.tcx.at(cx.body.span).mk_trait_ref(LangItem::Destruct, [ty]))
.with_constness(ty::BoundConstness::ConstIfConst),
ty::Binder::dummy(ty::TraitRef::from_lang_item(
cx.tcx.at(cx.body.span),
LangItem::Destruct,
[ty],
))
.with_constness(ty::BoundConstness::ConstIfConst),
);
let infcx = cx.tcx.infer_ctxt().build();