1
Fork 0

Use param_env_reveal_all_normalized in MIR opts.

This commit is contained in:
Camille GILLOT 2023-04-15 08:34:05 +00:00
parent 7efcf67a3b
commit 4fe51365d7
7 changed files with 10 additions and 8 deletions

View file

@ -355,7 +355,7 @@ fn build_thread_local_shim<'tcx>(tcx: TyCtxt<'tcx>, instance: ty::InstanceDef<'t
fn build_clone_shim<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId, self_ty: Ty<'tcx>) -> Body<'tcx> {
debug!("build_clone_shim(def_id={:?})", def_id);
let param_env = tcx.param_env(def_id);
let param_env = tcx.param_env_reveal_all_normalized(def_id);
let mut builder = CloneShimBuilder::new(tcx, def_id, self_ty);
let is_copy = self_ty.is_copy_modulo_regions(tcx, param_env);
@ -836,7 +836,7 @@ fn build_call_shim<'tcx>(
pub fn build_adt_ctor(tcx: TyCtxt<'_>, ctor_id: DefId) -> Body<'_> {
debug_assert!(tcx.is_constructor(ctor_id));
let param_env = tcx.param_env(ctor_id);
let param_env = tcx.param_env_reveal_all_normalized(ctor_id);
// Normalize the sig.
let sig = tcx