]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_mir/interpret/operand.rs
Rollup merge of #71508 - oli-obk:alloc_map_unlock, r=RalfJung
[rust.git] / src / librustc_mir / interpret / operand.rs
index 81009fd7b98f73716be27632ef7853e4a0e2caeb..a3caa2048a1e74a0d9a3e6fc6021e858bf62ef83 100644 (file)
@@ -549,7 +549,7 @@ pub(super) fn eval_operands(
         let layout = from_known_layout(self.tcx, layout, || self.layout_of(val.ty))?;
         let op = match val_val {
             ConstValue::ByRef { alloc, offset } => {
-                let id = self.tcx.alloc_map.lock().create_memory_alloc(alloc);
+                let id = self.tcx.create_memory_alloc(alloc);
                 // We rely on mutability being set correctly in that allocation to prevent writes
                 // where none should happen.
                 let ptr = self.tag_global_base_pointer(Pointer::new(id, offset));
@@ -560,7 +560,7 @@ pub(super) fn eval_operands(
                 // We rely on mutability being set correctly in `data` to prevent writes
                 // where none should happen.
                 let ptr = Pointer::new(
-                    self.tcx.alloc_map.lock().create_memory_alloc(data),
+                    self.tcx.create_memory_alloc(data),
                     Size::from_bytes(start), // offset: `start`
                 );
                 Operand::Immediate(Immediate::new_slice(