Fix miri
This commit is contained in:
parent
9776723881
commit
39bfb3626c
@ -130,6 +130,34 @@ impl<Tag> Allocation<Tag> {
|
||||
}
|
||||
}
|
||||
|
||||
impl Allocation<()> {
|
||||
/// Add Tag and Extra fields
|
||||
pub fn retag<T, E>(
|
||||
self,
|
||||
mut tagger: impl FnMut(AllocId) -> T,
|
||||
extra: E,
|
||||
) -> Allocation<T, E> {
|
||||
Allocation {
|
||||
bytes: self.bytes,
|
||||
size: self.size,
|
||||
relocations: Relocations::from_presorted(
|
||||
self.relocations.iter()
|
||||
// The allocations in the relocations (pointers stored *inside* this allocation)
|
||||
// all get the base pointer tag.
|
||||
.map(|&(offset, ((), alloc))| {
|
||||
let tag = tagger(alloc);
|
||||
(offset, (tag, alloc))
|
||||
})
|
||||
.collect()
|
||||
),
|
||||
undef_mask: self.undef_mask,
|
||||
align: self.align,
|
||||
mutability: self.mutability,
|
||||
extra,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Raw accessors. Provide access to otherwise private bytes.
|
||||
impl<Tag, Extra> Allocation<Tag, Extra> {
|
||||
pub fn len(&self) -> usize {
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 69268fb75fdb452296caa9bc4aaeff1674279de2
|
||||
Subproject commit e479ab26406ed8a473987e5f4a1f3be3e978e5d2
|
Loading…
Reference in New Issue
Block a user