Skip to content

Commit 2baeb9b

Browse files
Lift TraitRef into rustc_type_ir
1 parent 44c29bd commit 2baeb9b

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

clippy_lints/src/future_not_send.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ use rustc_hir::{Body, FnDecl};
55
use rustc_infer::infer::TyCtxtInferExt;
66
use rustc_lint::{LateContext, LateLintPass};
77
use rustc_middle::ty::{self, AliasTy, ClauseKind, PredicateKind};
8+
use rustc_middle::ty::print::PrintTraitRefExt;
89
use rustc_session::declare_lint_pass;
910
use rustc_span::def_id::LocalDefId;
1011
use rustc_span::{sym, Span};

clippy_utils/src/qualify_min_const_fn.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ fn is_ty_const_destruct<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>, body: &Body<'tcx>
402402
tcx,
403403
ObligationCause::dummy_with_span(body.span),
404404
ConstCx::new(tcx, body).param_env,
405-
TraitRef::from_lang_item(tcx, LangItem::Destruct, body.span, [ty]),
405+
TraitRef::new(tcx, tcx.require_lang_item(LangItem::Destruct, Some(body.span)), [ty]),
406406
);
407407

408408
let infcx = tcx.infer_ctxt().build();

0 commit comments

Comments
 (0)