ConstCx
stop using ParamEnv::reveal
This commit is contained in:
parent
84295b917d
commit
aab149b58c
6 changed files with 27 additions and 27 deletions
|
@ -12,7 +12,7 @@ use rustc_middle::mir::CallSource;
|
|||
use rustc_middle::span_bug;
|
||||
use rustc_middle::ty::print::{PrintTraitRefExt as _, with_no_trimmed_paths};
|
||||
use rustc_middle::ty::{
|
||||
self, Closure, FnDef, FnPtr, GenericArgKind, GenericArgsRef, Param, TraitRef, Ty, TypingMode,
|
||||
self, Closure, FnDef, FnPtr, GenericArgKind, GenericArgsRef, Param, TraitRef, Ty,
|
||||
suggest_constraining_type_param,
|
||||
};
|
||||
use rustc_middle::util::{CallDesugaringKind, CallKind, call_kind};
|
||||
|
@ -116,7 +116,7 @@ impl<'tcx> NonConstOp<'tcx> for FnCallNonConst<'tcx> {
|
|||
let obligation =
|
||||
Obligation::new(tcx, ObligationCause::dummy(), param_env, trait_ref);
|
||||
|
||||
let infcx = tcx.infer_ctxt().build(TypingMode::from_param_env(param_env));
|
||||
let infcx = tcx.infer_ctxt().build(body.phase.typing_mode());
|
||||
let mut selcx = SelectionContext::new(&infcx);
|
||||
let implsrc = selcx.select(&obligation);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue