Add helper to create the trait ref for a lang item
This commit is contained in:
parent
25c4760b5d
commit
ad57f88d3f
10 changed files with 51 additions and 66 deletions
|
@ -153,14 +153,12 @@ impl Qualif for NeedsNonConstDrop {
|
|||
return false;
|
||||
}
|
||||
|
||||
let destruct = cx.tcx.require_lang_item(LangItem::Destruct, None);
|
||||
|
||||
let obligation = Obligation::new(
|
||||
cx.tcx,
|
||||
ObligationCause::dummy(),
|
||||
ObligationCause::dummy_with_span(cx.body.span),
|
||||
cx.param_env,
|
||||
ty::Binder::dummy(ty::TraitPredicate {
|
||||
trait_ref: cx.tcx.mk_trait_ref(destruct, ty, []),
|
||||
trait_ref: cx.tcx.at(cx.body.span).mk_trait_ref(LangItem::Destruct, ty, []),
|
||||
constness: ty::BoundConstness::ConstIfConst,
|
||||
polarity: ty::ImplPolarity::Positive,
|
||||
}),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue