Auto merge of #110806 - WaffleLapkin:unmkI, r=lcnr

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

First step in implementing https://github.com/rust-lang/compiler-team/issues/616
r? `@lcnr`
This commit is contained in:
bors 2023-05-04 05:54:09 +00:00
commit 6f8c0557e0
49 changed files with 246 additions and 181 deletions

View file

@ -157,7 +157,7 @@ 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]))
ty::TraitRef::from_lang_item(cx.tcx, LangItem::Destruct, cx.body.span, [ty])
.with_constness(ty::BoundConstness::ConstIfConst),
);