diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2014-06-27 12:30:25 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2014-06-29 11:47:58 -0700 |
| commit | a5bb0a3a4574af88add700ace7aefc37172fa7a5 (patch) | |
| tree | 5c2505254a2fdc396d600807b071c00b064c18b7 /src/liballoc | |
| parent | bd9563aa382ccfbda36049786329edcdc609930c (diff) | |
| download | rust-a5bb0a3a4574af88add700ace7aefc37172fa7a5.tar.gz rust-a5bb0a3a4574af88add700ace7aefc37172fa7a5.zip | |
librustc: Remove the fallback to `int` for integers and `f64` for
floating point numbers for real.
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]
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/arc.rs | 4 | ||||
| -rw-r--r-- | src/liballoc/heap.rs | 2 |
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 }) } } |
