about summary refs log tree commit diff
path: root/src/libdebug
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/libdebug
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/libdebug')
-rw-r--r--src/libdebug/repr.rs22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/libdebug/repr.rs b/src/libdebug/repr.rs
index 1494a2defe9..133353ec3d7 100644
--- a/src/libdebug/repr.rs
+++ b/src/libdebug/repr.rs
@@ -588,22 +588,22 @@ fn test_repr() {
         assert_eq!(s.as_slice(), e);
     }
 
-    exact_test(&10, "10");
+    exact_test(&10i, "10");
     exact_test(&true, "true");
     exact_test(&false, "false");
-    exact_test(&1.234, "1.234f64");
+    exact_test(&1.234f64, "1.234f64");
     exact_test(&("hello"), "\"hello\"");
 
-    exact_test(&(box(GC) 10), "box(GC) 10");
-    exact_test(&(box 10), "box 10");
-    exact_test(&(&10), "&10");
-    let mut x = 10;
+    exact_test(&(box(GC) 10i), "box(GC) 10");
+    exact_test(&(box 10i), "box 10");
+    exact_test(&(&10i), "&10");
+    let mut x = 10i;
     exact_test(&(&mut x), "&mut 10");
 
-    exact_test(&(0 as *const ()), "(0x0 as *const ())");
-    exact_test(&(0 as *mut ()), "(0x0 as *mut ())");
+    exact_test(&(0i as *const()), "(0x0 as *const ())");
+    exact_test(&(0i as *mut ()), "(0x0 as *mut ())");
 
-    exact_test(&(1,), "(1,)");
+    exact_test(&(1i,), "(1,)");
     exact_test(&(&["hi", "there"]),
                "&[\"hi\", \"there\"]");
     exact_test(&(P{a:10, b:1.234}),
@@ -613,8 +613,8 @@ fn test_repr() {
     exact_test(&(box P{a:10, b:1.234}),
                "box repr::P{a: 10, b: 1.234f64}");
 
-    exact_test(&(&[1, 2]), "&[1, 2]");
-    exact_test(&(&mut [1, 2]), "&mut [1, 2]");
+    exact_test(&(&[1i, 2i]), "&[1, 2]");
+    exact_test(&(&mut [1i, 2i]), "&mut [1, 2]");
 
     exact_test(&'\'', "'\\''");
     exact_test(&'"', "'\"'");