1
Fork 0

InterpCx store TypingEnv instead of a ParamEnv

This commit is contained in:
lcnr 2024-11-19 20:10:42 +01:00
parent b9dea31ea9
commit 7a90e84f4d
36 changed files with 167 additions and 192 deletions

View file

@ -188,8 +188,8 @@ pub fn check_crate(tcx: TyCtxt<'_>) {
DefKind::Const if tcx.generics_of(item_def_id).is_empty() => {
let instance = ty::Instance::new(item_def_id.into(), ty::GenericArgs::empty());
let cid = GlobalId { instance, promoted: None };
let param_env = ty::ParamEnv::reveal_all();
tcx.ensure().eval_to_const_value_raw(param_env.and(cid));
let typing_env = ty::TypingEnv::fully_monomorphized();
tcx.ensure().eval_to_const_value_raw(typing_env.as_query_input(cid));
}
_ => (),
}