Add new ToPredicate impls and TraitRef methods to remove some ty::Binber::dummy calls

This commit is contained in:
Maybe Waffle 2023-04-26 11:48:17 +00:00
parent 4f2532fb53
commit 1b8c7784e5
9 changed files with 46 additions and 32 deletions

View file

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