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
This commit is contained in:
commit
e987a99ed2
1 changed files with 1 additions and 1 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue