From bcebf58accb50f2252a1bf728a8da2316a1c1e48 Mon Sep 17 00:00:00 2001 From: Nia Espera Date: Wed, 28 May 2025 13:04:37 +0200 Subject: [PATCH] interpret/allocation: make alloc fn be FnOnce --- compiler/rustc_middle/src/mir/interpret/allocation.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/rustc_middle/src/mir/interpret/allocation.rs b/compiler/rustc_middle/src/mir/interpret/allocation.rs index f17747558fc55..dd55d039794f7 100644 --- a/compiler/rustc_middle/src/mir/interpret/allocation.rs +++ b/compiler/rustc_middle/src/mir/interpret/allocation.rs @@ -512,7 +512,7 @@ impl Allocation { pub fn adjust_from_tcx<'tcx, Prov: Provenance, Bytes: AllocBytes>( &self, cx: &impl HasDataLayout, - mut alloc_bytes: impl FnMut(&[u8], Align) -> InterpResult<'tcx, Bytes>, + alloc_bytes: impl FnOnce(&[u8], Align) -> InterpResult<'tcx, Bytes>, mut adjust_ptr: impl FnMut(Pointer) -> InterpResult<'tcx, Pointer>, ) -> InterpResult<'tcx, Allocation> { // Copy the data.