1
Fork 0

Switch ty::TraitRef::from_lang_item from using TyCtxtAt to TyCtxt and a Span

This commit is contained in:
Maybe Waffle 2023-04-26 10:55:11 +00:00
parent 071f737a57
commit 4f2532fb53
10 changed files with 33 additions and 24 deletions

View file

@ -158,8 +158,9 @@ impl Qualif for NeedsNonConstDrop {
ObligationCause::dummy_with_span(cx.body.span),
cx.param_env,
ty::Binder::dummy(ty::TraitRef::from_lang_item(
cx.tcx.at(cx.body.span),
cx.tcx,
LangItem::Destruct,
cx.body.span,
[ty],
))
.with_constness(ty::BoundConstness::ConstIfConst),