about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2014-06-27 12:30:25 -0700
committerPatrick Walton <pcwalton@mimiga.net>2014-06-29 11:47:58 -0700
commita5bb0a3a4574af88add700ace7aefc37172fa7a5 (patch)
tree5c2505254a2fdc396d600807b071c00b064c18b7 /src/libsyntax
parentbd9563aa382ccfbda36049786329edcdc609930c (diff)
downloadrust-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/libsyntax')
-rw-r--r--src/libsyntax/print/pprust.rs4
-rw-r--r--src/libsyntax/util/small_vector.rs6
2 files changed, 5 insertions, 5 deletions
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs
index 6719f25abb9..a9cf4fbd9f0 100644
--- a/src/libsyntax/print/pprust.rs
+++ b/src/libsyntax/print/pprust.rs
@@ -998,7 +998,7 @@ impl<'a> State<'a> {
 
     pub fn print_outer_attributes(&mut self,
                                   attrs: &[ast::Attribute]) -> IoResult<()> {
-        let mut count = 0;
+        let mut count = 0u;
         for attr in attrs.iter() {
             match attr.node.style {
                 ast::AttrOuter => {
@@ -1016,7 +1016,7 @@ impl<'a> State<'a> {
 
     pub fn print_inner_attributes(&mut self,
                                   attrs: &[ast::Attribute]) -> IoResult<()> {
-        let mut count = 0;
+        let mut count = 0u;
         for attr in attrs.iter() {
             match attr.node.style {
                 ast::AttrInner => {
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<int> = 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]