Skip to content

Commit

Permalink
Fix rebase conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
arielb1 committed May 19, 2015
1 parent 3afd760 commit e7e1fd2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
8 changes: 6 additions & 2 deletions src/liballoc/arc.rs
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_lint/builtin.rs
Expand Up @@ -206,7 +206,7 @@ impl LintPass for TypeLimits {
let (min, max) = int_ty_range(int_type);
let negative = self.negated_expr_id == e.id;

if (negative && v > (min.abs() as u64)) ||
if (negative && v > min.wrapping_neg() as u64) ||
(!negative && v > (max.abs() as u64)) {
cx.span_lint(OVERFLOWING_LITERALS, e.span,
&*format!("literal out of range for {:?}", t));
Expand Down
5 changes: 3 additions & 2 deletions src/librustc_trans/trans/expr.rs
Expand Up @@ -2048,8 +2048,9 @@ fn trans_imm_cast<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
} else { llsrc };
}

let _icx = push_ctxt("trans_cast"); let mut bcx = bcx; let ccx =
bcx.ccx();
let _icx = push_ctxt("trans_cast");
let mut bcx = bcx;
let ccx = bcx.ccx();

let t_in = expr_ty_adjusted(bcx, expr);
let t_out = node_id_type(bcx, id);
Expand Down

0 comments on commit e7e1fd2

Please sign in to comment.