Skip to content

Commit fa8f888

Browse files
committed
---
yaml --- r: 214524 b: refs/heads/beta c: e7e1fd2 h: refs/heads/master v: v3
1 parent 818ffea commit fa8f888

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
2323
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
2424
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26-
refs/heads/beta: 3afd760bb3fc8c90adfd9451e1cd8b161301f218
26+
refs/heads/beta: e7e1fd20deb95f74c4a33c76921907e039dff894
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: 8c0aa6d64ebab528f7eb182812007155d6044972
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/src/liballoc/arc.rs

Lines changed: 6 additions & 2 deletions
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

branches/beta/src/librustc_lint/builtin.rs

Lines changed: 1 addition & 1 deletion
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));

branches/beta/src/librustc_trans/trans/expr.rs

Lines changed: 3 additions & 2 deletions
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)