Skip to content

Commit d30a0b2

Browse files
committed
ConstCx stop using ParamEnv::reveal
1 parent d9a0fec commit d30a0b2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clippy_utils/src/qualify_min_const_fn.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use rustc_middle::mir::{
1717
};
1818
use rustc_middle::traits::{BuiltinImplSource, ImplSource, ObligationCause};
1919
use rustc_middle::ty::adjustment::PointerCoercion;
20-
use rustc_middle::ty::{self, GenericArgKind, TraitRef, Ty, TyCtxt, TypingMode};
20+
use rustc_middle::ty::{self, GenericArgKind, TraitRef, Ty, TyCtxt};
2121
use rustc_span::Span;
2222
use rustc_span::symbol::sym;
2323
use rustc_trait_selection::traits::{ObligationCtxt, SelectionContext};
@@ -420,7 +420,7 @@ fn is_ty_const_destruct<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>, body: &Body<'tcx>
420420
TraitRef::new(tcx, tcx.require_lang_item(LangItem::Destruct, Some(body.span)), [ty]),
421421
);
422422

423-
let infcx = tcx.infer_ctxt().build(TypingMode::from_param_env(obligation.param_env));
423+
let infcx = tcx.infer_ctxt().build(body.phase.typing_mode());
424424
let mut selcx = SelectionContext::new(&infcx);
425425
let Some(impl_src) = selcx.select(&obligation).ok().flatten() else {
426426
return false;

0 commit comments

Comments
 (0)