1
Fork 0

Fix rebase conflicts

This commit is contained in:
Ariel Ben-Yehuda 2015-05-19 22:54:44 +03:00
parent 3afd760bb3
commit e7e1fd20de
3 changed files with 10 additions and 5 deletions

View file

@ -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