]> git.lizzy.rs Git - rust.git/commitdiff
Fix rebase conflicts
authorAriel Ben-Yehuda <ariel.byd@gmail.com>
Tue, 19 May 2015 19:54:44 +0000 (22:54 +0300)
committerAriel Ben-Yehuda <ariel.byd@gmail.com>
Tue, 19 May 2015 19:54:44 +0000 (22:54 +0300)
src/liballoc/arc.rs
src/librustc_lint/builtin.rs
src/librustc_trans/trans/expr.rs

index ff942444a617638a0b2b222fd5d1f84edcf074c4..97e85b114b06079dd07d0eeb6b751538673233be 100644 (file)
@@ -394,7 +394,9 @@ fn drop(&mut self) {
         // 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 @@ fn drop(&mut self) {
         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
index 8d555240e707b31751facd1d4c5f8fbca1e010eb..3716ee395bfd4ffae49db92b71123849f41f90cb 100644 (file)
@@ -206,7 +206,7 @@ fn check_expr(&mut self, cx: &Context, e: &ast::Expr) {
                                 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));
index 90741d1d58fbc3e32f4e2f0c886368c8b454b089..33eb3814087f52e21a95e215142e45e5ca0d2db8 100644 (file)
@@ -2048,8 +2048,9 @@ fn float_cast(bcx: Block,
         } 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);