diff options
| author | Aria Beingessner <a.beingessner@gmail.com> | 2022-03-22 01:24:55 -0400 | 
|---|---|---|
| committer | Aria Beingessner <a.beingessner@gmail.com> | 2022-03-29 20:18:21 -0400 | 
| commit | c7de289e1c8d24bd55aaa33813e509920a00c364 (patch) | |
| tree | b8dcd314558cc77fe1353c890c39c7026b7414b8 /library/alloc/src/slice.rs | |
| parent | 5167b6891ccf05aa7a2191675e6c3da95d84374a (diff) | |
| download | rust-c7de289e1c8d24bd55aaa33813e509920a00c364.tar.gz rust-c7de289e1c8d24bd55aaa33813e509920a00c364.zip | |
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.
Diffstat (limited to 'library/alloc/src/slice.rs')
| -rw-r--r-- | library/alloc/src/slice.rs | 2 | 
1 files changed, 1 insertions, 1 deletions
| diff --git a/library/alloc/src/slice.rs b/library/alloc/src/slice.rs index f52871c73d9..7c892f03bfb 100644 --- a/library/alloc/src/slice.rs +++ b/library/alloc/src/slice.rs @@ -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); } | 
