From a5bb0a3a4574af88add700ace7aefc37172fa7a5 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Fri, 27 Jun 2014 12:30:25 -0700 Subject: 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] --- src/libsyntax/util/small_vector.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libsyntax/util/small_vector.rs') diff --git a/src/libsyntax/util/small_vector.rs b/src/libsyntax/util/small_vector.rs index d5cc2c7f304..43367611ab2 100644 --- a/src/libsyntax/util/small_vector.rs +++ b/src/libsyntax/util/small_vector.rs @@ -166,8 +166,8 @@ mod test { let v: SmallVector = SmallVector::zero(); assert_eq!(0, v.len()); - assert_eq!(1, SmallVector::one(1).len()); - assert_eq!(5, SmallVector::many(vec!(1, 2, 3, 4, 5)).len()); + assert_eq!(1, SmallVector::one(1i).len()); + assert_eq!(5, SmallVector::many(vec!(1i, 2, 3, 4, 5)).len()); } #[test] @@ -215,7 +215,7 @@ mod test { #[test] #[should_fail] fn test_expect_one_many() { - SmallVector::many(vec!(1, 2)).expect_one(""); + SmallVector::many(vec!(1i, 2)).expect_one(""); } #[test] -- cgit 1.4.1-3-g733a5