]> git.lizzy.rs Git - rust.git/commitdiff
Use the `_` representation for integral variables as well
authorJakub Bukaj <jakub@jakub.cc>
Thu, 30 Oct 2014 20:17:06 +0000 (21:17 +0100)
committerJakub Bukaj <jakub@jakub.cc>
Thu, 30 Oct 2014 20:38:20 +0000 (21:38 +0100)
src/librustc/util/ppaux.rs
src/test/compile-fail/issue-13482.rs
src/test/compile-fail/issue-4201.rs
src/test/compile-fail/issue-4968.rs
src/test/compile-fail/repeat_count.rs
src/test/compile-fail/slightly-nice-generic-literal-messages.rs

index 633a350ddb2a49e6a51e12ce0a5d636ddc113a3f..8befba00fd2fefa541d5e4623908c4808290e1dd 100644 (file)
@@ -376,9 +376,8 @@ fn infer_ty_to_string(cx: &ctxt, ty: ty::InferTy) -> String {
                 format!("_#{}i", vid),
             ty::FloatVar(ty::FloatVid { index: vid }) if print_var_ids =>
                 format!("_#{}f", vid),
-            ty::TyVar(_) => "_".to_string(),
-            ty::IntVar(_) => "_#i".to_string(),
-            ty::FloatVar(_) => "_#f".to_string(),
+            ty::TyVar(_) | ty::IntVar(_) | ty::FloatVar(_) =>
+                "_".to_string(),
             ty::SkolemizedTy(v) => format!("SkolemizedTy({})", v),
             ty::SkolemizedIntTy(v) => format!("SkolemizedIntTy({})", v)
         }
index e0b1f8845e2367474e0808930a54caf2d5547df2..18070ed53b04ac8a791d27666bf753465a65d464 100644 (file)
@@ -12,7 +12,7 @@ fn main() {
   let x = [1,2];
   let y = match x {
     [] => None,
-//~^ ERROR types: expected `[_#i, ..2]`, found `[_, ..0]`
+//~^ ERROR types: expected `[_, ..2]`, found `[_, ..0]`
 //         (expected array of 2 elements, found array of 0 elements)
     [a,_] => Some(a)
   };
index 5899fa43a48217151013ff57ccb2ce53c311aaee..0391c73d90a6cca8032e62e0584c8a659a21ebe0 100644 (file)
@@ -12,7 +12,7 @@ fn main() {
     let a = if true {
         0
     } else if false {
-//~^ ERROR if may be missing an else clause: expected `()`, found `_#i`
+//~^ ERROR if may be missing an else clause: expected `()`, found `_`
         1
     };
 }
index 54fd9d492bfcb27b5839ed6df2972aaef90c141c..cf1f1f5908954541c4fe5c2b71e673dac1118146 100644 (file)
@@ -13,6 +13,6 @@
 const A: (int,int) = (4,2);
 fn main() {
     match 42 { A => () }
-    //~^ ERROR mismatched types: expected `_#i`, found `(int, int)`
+    //~^ ERROR mismatched types: expected `_`, found `(int, int)`
     //         (expected integral variable, found tuple)
 }
index 0d4dab9916dcf097a82928e42ada179271db30be..be79a7a915b881b346e9091b804d4dc0ac6dcb1e 100644 (file)
@@ -18,7 +18,7 @@ fn main() {
     let c = [0, ..true]; //~ ERROR expected positive integer for repeat count, found boolean
     //~^ ERROR: expected `uint`, found `bool`
     let d = [0, ..0.5]; //~ ERROR expected positive integer for repeat count, found float
-    //~^ ERROR: expected `uint`, found `_#f`
+    //~^ ERROR: expected `uint`, found `_`
     let e = [0, .."foo"]; //~ ERROR expected positive integer for repeat count, found string
     //~^ ERROR: expected `uint`, found `&'static str`
     let f = [0, ..-4];
index 3ac3988bad2bd7f68046151145c866453c96ad7a..a655a17c037d249473f7dcbc419957422c5bcd93 100644 (file)
@@ -13,7 +13,7 @@
 fn main() {
     match Foo(1.1) {
         1 => {}
-    //~^ ERROR expected `Foo<_#f, _>`, found `_#i`
+    //~^ ERROR expected `Foo<_, _>`, found `_`
     }
 
 }