diff options
| author | Ariel Ben-Yehuda <ariel.byd@gmail.com> | 2015-05-19 22:54:44 +0300 |
|---|---|---|
| committer | Ariel Ben-Yehuda <ariel.byd@gmail.com> | 2015-05-19 22:54:44 +0300 |
| commit | e7e1fd20deb95f74c4a33c76921907e039dff894 (patch) | |
| tree | 9080e049ab27e09e2232428c0d7dc422d6b93988 /src/liballoc | |
| parent | 3afd760bb3fc8c90adfd9451e1cd8b161301f218 (diff) | |
| download | rust-e7e1fd20deb95f74c4a33c76921907e039dff894.tar.gz rust-e7e1fd20deb95f74c4a33c76921907e039dff894.zip | |
Fix rebase conflicts
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/arc.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/liballoc/arc.rs b/src/liballoc/arc.rs index ff942444a61..97e85b114b0 100644 --- a/src/liballoc/arc.rs +++ b/src/liballoc/arc.rs @@ -394,7 +394,9 @@ impl<T: ?Sized> Drop for Arc<T> { // it's run more than once) let ptr = *self._ptr; // if ptr.is_null() { return } - if ptr as usize == 0 || ptr as usize == mem::POST_DROP_USIZE { return } + if ptr as *mut u8 as usize == 0 || ptr as *mut u8 as usize == mem::POST_DROP_USIZE { + return + } // Because `fetch_sub` is already atomic, we do not need to synchronize // with other threads unless we are going to delete the object. This @@ -524,7 +526,9 @@ impl<T: ?Sized> Drop for Weak<T> { let ptr = *self._ptr; // see comments above for why this check is here - if ptr as usize == 0 || ptr as usize == mem::POST_DROP_USIZE { return } + if ptr as *mut u8 as usize == 0 || ptr as *mut u8 as usize == mem::POST_DROP_USIZE { + return + } // If we find out that we were the last weak pointer, then its time to // deallocate the data entirely. See the discussion in Arc::drop() about |
