Make the stdlib largely conform to strict provenance.
Some things like the unwinders and system APIs are not fully conformant, this only covers a lot of low-hanging fruit.
This commit is contained in:
parent
5167b6891c
commit
c7de289e1c
30 changed files with 100 additions and 81 deletions
|
@ -1044,7 +1044,7 @@ where
|
|||
impl<T> Drop for MergeHole<T> {
|
||||
fn drop(&mut self) {
|
||||
// `T` is not a zero-sized type, so it's okay to divide by its size.
|
||||
let len = (self.end as usize - self.start as usize) / mem::size_of::<T>();
|
||||
let len = (self.end.addr() - self.start.addr()) / mem::size_of::<T>();
|
||||
unsafe {
|
||||
ptr::copy_nonoverlapping(self.start, self.dest, len);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue