From 18bfca50f1a6d9ccf322fa4dafec3a67a39ef300 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Tue, 16 Apr 2024 16:37:34 +0200 Subject: interpret: pass MemoryKind to before_memory_deallocation --- compiler/rustc_const_eval/src/interpret/machine.rs | 1 + compiler/rustc_const_eval/src/interpret/memory.rs | 1 + 2 files changed, 2 insertions(+) (limited to 'compiler/rustc_const_eval/src') diff --git a/compiler/rustc_const_eval/src/interpret/machine.rs b/compiler/rustc_const_eval/src/interpret/machine.rs index 827d8fd9417..be66ac548d3 100644 --- a/compiler/rustc_const_eval/src/interpret/machine.rs +++ b/compiler/rustc_const_eval/src/interpret/machine.rs @@ -427,6 +427,7 @@ pub trait Machine<'mir, 'tcx: 'mir>: Sized { _prov: (AllocId, Self::ProvenanceExtra), _size: Size, _align: Align, + _kind: MemoryKind, ) -> InterpResult<'tcx> { Ok(()) } diff --git a/compiler/rustc_const_eval/src/interpret/memory.rs b/compiler/rustc_const_eval/src/interpret/memory.rs index 9b1d9cf932b..ca2beb40ce8 100644 --- a/compiler/rustc_const_eval/src/interpret/memory.rs +++ b/compiler/rustc_const_eval/src/interpret/memory.rs @@ -355,6 +355,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> { (alloc_id, prov), size, alloc.align, + kind, )?; // Don't forget to remember size and align of this now-dead allocation -- cgit 1.4.1-3-g733a5