mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-21 17:52:12 +03:00
InterpCx store TypingEnv instead of a ParamEnv
This commit is contained in:
@@ -270,8 +270,8 @@ fn is_value_unfrozen_poly(cx: &LateContext<'tcx>, body_id: BodyId, ty: Ty<'tcx>)
|
||||
instance,
|
||||
promoted: None,
|
||||
};
|
||||
let param_env = cx.tcx.param_env(def_id).with_reveal_all_normalized(cx.tcx);
|
||||
let result = cx.tcx.const_eval_global_id_for_typeck(param_env, cid, DUMMY_SP);
|
||||
let typing_env = ty::TypingEnv::post_analysis(cx.tcx, def_id);
|
||||
let result = cx.tcx.const_eval_global_id_for_typeck(typing_env, cid, DUMMY_SP);
|
||||
Self::is_value_unfrozen_raw(cx, result, ty)
|
||||
}
|
||||
|
||||
@@ -294,7 +294,7 @@ pub fn const_eval_resolve(
|
||||
instance,
|
||||
promoted: None,
|
||||
};
|
||||
tcx.const_eval_global_id_for_typeck(typing_env.param_env, cid, span)
|
||||
tcx.const_eval_global_id_for_typeck(typing_env, cid, span)
|
||||
},
|
||||
Ok(None) => Err(ErrorHandled::TooGeneric(span)),
|
||||
Err(err) => Err(ErrorHandled::Reported(err.into(), span)),
|
||||
|
||||
Reference in New Issue
Block a user