mirror of https://github.com/rust-lang/rust.git
Reduce mutability in std-use of with_metadata_of
This commit is contained in:
parent
71c39dea4d
commit
e3606b2b02
|
@ -1386,7 +1386,7 @@ impl<T: ?Sized> Rc<T> {
|
|||
Self::allocate_for_layout(
|
||||
Layout::for_value(&*ptr),
|
||||
|layout| Global.allocate(layout),
|
||||
|mem| mem.with_metadata_of(ptr as *mut RcBox<T>),
|
||||
|mem| mem.with_metadata_of(ptr as *const RcBox<T>),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1204,7 +1204,7 @@ impl<T: ?Sized> Arc<T> {
|
|||
Self::allocate_for_layout(
|
||||
Layout::for_value(&*ptr),
|
||||
|layout| Global.allocate(layout),
|
||||
|mem| mem.with_metadata_of(ptr as *mut ArcInner<T>),
|
||||
|mem| mem.with_metadata_of(ptr as *const ArcInner<T>),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue