diff options
| author | lcnr <rust@lcnr.de> | 2024-10-31 12:41:50 +0100 | 
|---|---|---|
| committer | lcnr <rust@lcnr.de> | 2024-10-31 14:55:53 +0100 | 
| commit | 2cde638ac0b8f2fd1b7ad29606a1a406b276482a (patch) | |
| tree | e57f5c58eb655b404ed18a5e58daff11e58deef2 /compiler/rustc_const_eval/src/interpret/operand.rs | |
| parent | 563c473e8d23cc6ebbe501d30749ee4225efa1e6 (diff) | |
| download | rust-2cde638ac0b8f2fd1b7ad29606a1a406b276482a.tar.gz rust-2cde638ac0b8f2fd1b7ad29606a1a406b276482a.zip | |
stop using `ParamEnv::reveal` while handling MIR
Diffstat (limited to 'compiler/rustc_const_eval/src/interpret/operand.rs')
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/operand.rs | 5 | 
1 files changed, 4 insertions, 1 deletions
| diff --git a/compiler/rustc_const_eval/src/interpret/operand.rs b/compiler/rustc_const_eval/src/interpret/operand.rs index 43ae98e74b0..a130ae89bcb 100644 --- a/compiler/rustc_const_eval/src/interpret/operand.rs +++ b/compiler/rustc_const_eval/src/interpret/operand.rs @@ -773,6 +773,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> { )?; if !mir_assign_valid_types( *self.tcx, + self.typing_mode(), self.param_env, self.layout_of(normalized_place_ty)?, op.layout, @@ -832,7 +833,9 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> { }) }; let layout = - from_known_layout(self.tcx, self.param_env, layout, || self.layout_of(ty).into())?; + from_known_layout(self.tcx, self.typing_mode(), self.param_env, layout, || { + self.layout_of(ty).into() + })?; let imm = match val_val { mir::ConstValue::Indirect { alloc_id, offset } => { // This is const data, no mutation allowed. | 
