Skip to content

Commit e7e1fd2

Browse files
committed
Fix rebase conflicts
1 parent 3afd760 commit e7e1fd2

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

src/liballoc/arc.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,9 @@ impl<T: ?Sized> Drop for Arc<T> {
394394
// it's run more than once)
395395
let ptr = *self._ptr;
396396
// if ptr.is_null() { return }
397-
if ptr as usize == 0 || ptr as usize == mem::POST_DROP_USIZE { return }
397+
if ptr as *mut u8 as usize == 0 || ptr as *mut u8 as usize == mem::POST_DROP_USIZE {
398+
return
399+
}
398400

399401
// Because `fetch_sub` is already atomic, we do not need to synchronize
400402
// with other threads unless we are going to delete the object. This
@@ -524,7 +526,9 @@ impl<T: ?Sized> Drop for Weak<T> {
524526
let ptr = *self._ptr;
525527

526528
// see comments above for why this check is here
527-
if ptr as usize == 0 || ptr as usize == mem::POST_DROP_USIZE { return }
529+
if ptr as *mut u8 as usize == 0 || ptr as *mut u8 as usize == mem::POST_DROP_USIZE {
530+
return
531+
}
528532

529533
// If we find out that we were the last weak pointer, then its time to
530534
// deallocate the data entirely. See the discussion in Arc::drop() about

src/librustc_lint/builtin.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ impl LintPass for TypeLimits {
206206
let (min, max) = int_ty_range(int_type);
207207
let negative = self.negated_expr_id == e.id;
208208

209-
if (negative && v > (min.abs() as u64)) ||
209+
if (negative && v > min.wrapping_neg() as u64) ||
210210
(!negative && v > (max.abs() as u64)) {
211211
cx.span_lint(OVERFLOWING_LITERALS, e.span,
212212
&*format!("literal out of range for {:?}", t));

src/librustc_trans/trans/expr.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -2048,8 +2048,9 @@ fn trans_imm_cast<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
20482048
} else { llsrc };
20492049
}
20502050

2051-
let _icx = push_ctxt("trans_cast"); let mut bcx = bcx; let ccx =
2052-
bcx.ccx();
2051+
let _icx = push_ctxt("trans_cast");
2052+
let mut bcx = bcx;
2053+
let ccx = bcx.ccx();
20532054

20542055
let t_in = expr_ty_adjusted(bcx, expr);
20552056
let t_out = node_id_type(bcx, id);

0 commit comments

Comments
 (0)