about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-06-29 19:46:46 +0000
committerbors <bors@rust-lang.org>2014-06-29 19:46:46 +0000
commitff94f867d29a90ab59060c10a62f65994776a8c4 (patch)
tree2a1eb17ef28c64da19f6b3248217d113e6a2b8bd /src/liballoc
parentcc5663ad55f3dc3a642c8e2c4043900783dcc9f8 (diff)
parenta5bb0a3a4574af88add700ace7aefc37172fa7a5 (diff)
auto merge of #15234 : pcwalton/rust/integer-fallback-and-casts, r=alexcrichton
This will break code that looks like:

    let mut x = 0;
    while ... {
        x += 1;
    }
    println!("{}", x);

Change that code to:

    let mut x = 0i;
    while ... {
        x += 1;
    }
    println!("{}", x);

Closes #15201.

[breaking-change]

r? @alexcrichton
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/arc.rs4
-rw-r--r--src/liballoc/heap.rs2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/liballoc/arc.rs b/src/liballoc/arc.rs
index 6af4083edb2..38ed511c458 100644
--- a/src/liballoc/arc.rs
+++ b/src/liballoc/arc.rs
@@ -376,14 +376,14 @@ mod tests {
 
     #[test]
     fn test_live() {
-        let x = Arc::new(5);
+        let x = Arc::new(5i);
         let y = x.downgrade();
         assert!(y.upgrade().is_some());
     }
 
     #[test]
     fn test_dead() {
-        let x = Arc::new(5);
+        let x = Arc::new(5i);
         let y = x.downgrade();
         drop(x);
         assert!(y.upgrade().is_none());
diff --git a/src/liballoc/heap.rs b/src/liballoc/heap.rs
index 589ff8c1de9..dc8280e9b83 100644
--- a/src/liballoc/heap.rs
+++ b/src/liballoc/heap.rs
@@ -329,7 +329,7 @@ mod bench {
     #[bench]
     fn alloc_owned_small(b: &mut Bencher) {
         b.iter(|| {
-            box 10
+            box 10i
         })
     }
 }