Skip to content

Commit bcebf58

Browse files
committed
interpret/allocation: make alloc fn be FnOnce
1 parent cb678b9 commit bcebf58

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_middle/src/mir/interpret/allocation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ impl Allocation {
512512
pub fn adjust_from_tcx<'tcx, Prov: Provenance, Bytes: AllocBytes>(
513513
&self,
514514
cx: &impl HasDataLayout,
515-
mut alloc_bytes: impl FnMut(&[u8], Align) -> InterpResult<'tcx, Bytes>,
515+
alloc_bytes: impl FnOnce(&[u8], Align) -> InterpResult<'tcx, Bytes>,
516516
mut adjust_ptr: impl FnMut(Pointer<CtfeProvenance>) -> InterpResult<'tcx, Pointer<Prov>>,
517517
) -> InterpResult<'tcx, Allocation<Prov, (), Bytes>> {
518518
// Copy the data.

0 commit comments

Comments
 (0)