Skip to content

Commit 011a26b

Browse files
authored
Unrolled build for #141682
Rollup merge of #141682 - nia-e:fixup-alloc, r=RalfJung interpret/allocation: Fixup type for `alloc_bytes` This can be `FnOnce`, which helps us avoid an extra clone in rust-lang/miri#4343 r? RalfJung
2 parents 5f025f3 + bcebf58 commit 011a26b

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)