Lift TraitRef
into rustc_type_ir
This commit is contained in:
parent
44c29bd7d1
commit
2baeb9be54
@ -5,6 +5,7 @@
|
||||
use rustc_infer::infer::TyCtxtInferExt;
|
||||
use rustc_lint::{LateContext, LateLintPass};
|
||||
use rustc_middle::ty::{self, AliasTy, ClauseKind, PredicateKind};
|
||||
use rustc_middle::ty::print::PrintTraitRefExt;
|
||||
use rustc_session::declare_lint_pass;
|
||||
use rustc_span::def_id::LocalDefId;
|
||||
use rustc_span::{sym, Span};
|
||||
|
@ -402,7 +402,7 @@ fn is_ty_const_destruct_unused<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>, body: &Bod
|
||||
tcx,
|
||||
ObligationCause::dummy_with_span(body.span),
|
||||
ConstCx::new(tcx, body).param_env,
|
||||
TraitRef::from_lang_item(tcx, LangItem::Destruct, body.span, [ty]),
|
||||
TraitRef::new(tcx, tcx.require_lang_item(LangItem::Destruct, Some(body.span)), [ty]),
|
||||
);
|
||||
|
||||
let infcx = tcx.infer_ctxt().build();
|
||||
|
Loading…
Reference in New Issue
Block a user