cleanup op_to_const a bit; rename ConstValue::ByRef → Indirect
This commit is contained in:
parent
551f481ffb
commit
0f8908da27
14 changed files with 40 additions and 47 deletions
|
@ -756,7 +756,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
|
|||
};
|
||||
let layout = from_known_layout(self.tcx, self.param_env, layout, || self.layout_of(ty))?;
|
||||
let op = match val_val {
|
||||
ConstValue::ByRef { alloc_id, offset } => {
|
||||
ConstValue::Indirect { alloc_id, offset } => {
|
||||
// We rely on mutability being set correctly in that allocation to prevent writes
|
||||
// where none should happen.
|
||||
let ptr = self.global_base_pointer(Pointer::new(alloc_id, offset))?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue