about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNia Espera <a5b6@riseup.net>2025-05-28 13:04:37 +0200
committerNia Espera <a5b6@riseup.net>2025-05-28 13:16:20 +0200
commitbcebf58accb50f2252a1bf728a8da2316a1c1e48 (patch)
tree869b2afc377a5ae3a23692958f924c97406644fc
parentcb678b94c332548e3c3cefc22637929004c975d6 (diff)
downloadrust-bcebf58accb50f2252a1bf728a8da2316a1c1e48.tar.gz
rust-bcebf58accb50f2252a1bf728a8da2316a1c1e48.zip
interpret/allocation: make alloc fn be FnOnce
-rw-r--r--compiler/rustc_middle/src/mir/interpret/allocation.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_middle/src/mir/interpret/allocation.rs b/compiler/rustc_middle/src/mir/interpret/allocation.rs
index f17747558fc..dd55d039794 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<CtfeProvenance>) -> InterpResult<'tcx, Pointer<Prov>>,
     ) -> InterpResult<'tcx, Allocation<Prov, (), Bytes>> {
         // Copy the data.