]> git.lizzy.rs Git - rust.git/commitdiff
Move to {integer} and {float}
authorJonathan Turner <jturner@mozilla.com>
Thu, 28 Jul 2016 16:49:31 +0000 (09:49 -0700)
committerJonathan Turner <jturner@mozilla.com>
Thu, 28 Jul 2016 16:49:31 +0000 (09:49 -0700)
35 files changed:
src/librustc/util/ppaux.rs
src/test/compile-fail/array-not-vector.rs
src/test/compile-fail/bad-const-type.rs
src/test/compile-fail/coerce-mut.rs
src/test/compile-fail/coercion-slice.rs
src/test/compile-fail/fully-qualified-type-name1.rs
src/test/compile-fail/if-let-arm-types.rs
src/test/compile-fail/indexing-requires-a-uint.rs
src/test/compile-fail/integral-variable-unification-error.rs
src/test/compile-fail/issue-13466.rs
src/test/compile-fail/issue-17651.rs
src/test/compile-fail/issue-19991.rs
src/test/compile-fail/issue-26237.rs
src/test/compile-fail/issue-4201.rs
src/test/compile-fail/issue-4968.rs
src/test/compile-fail/issue-7867.rs
src/test/compile-fail/kindck-impl-type-params-2.rs
src/test/compile-fail/match-range-fail.rs
src/test/compile-fail/match-vec-mismatch.rs
src/test/compile-fail/method-self-arg-1.rs
src/test/compile-fail/mut-pattern-mismatched.rs
src/test/compile-fail/no_send-rc.rs
src/test/compile-fail/range-1.rs
src/test/compile-fail/repeat_count.rs
src/test/compile-fail/slightly-nice-generic-literal-messages.rs
src/test/compile-fail/str-idx.rs
src/test/compile-fail/struct-base-wrong-type-2.rs
src/test/compile-fail/struct-base-wrong-type.rs
src/test/compile-fail/traits-inductive-overflow-simultaneous.rs
src/test/compile-fail/tuple-arity-mismatch.rs
src/test/compile-fail/tuple-index-out-of-bounds.rs
src/test/compile-fail/type-mismatch-multiple.rs
src/test/compile-fail/typeck-unsafe-always-share.rs
src/test/compile-fail/vtable-res-trait-param.rs
src/test/ui/mismatched_types/issue-26480.stderr

index a33d914e7cf7a19ef0687661beaccc29d18b57dd..60977a80946ff6e23950ef024d739eb4764a45a1 100644 (file)
@@ -975,7 +975,8 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
             ty::IntVar(ref vid) if print_var_ids => write!(f, "{:?}", vid),
             ty::FloatVar(ref vid) if print_var_ids => write!(f, "{:?}", vid),
             ty::TyVar(_) => write!(f, "_"),
-            ty::IntVar(_) | ty::FloatVar(_) => write!(f, "{}", "{numeric}"),
+            ty::IntVar(_) => write!(f, "{}", "{integer}"),
+            ty::FloatVar(_) => write!(f, "{}", "{float}"),
             ty::FreshTy(v) => write!(f, "FreshTy({})", v),
             ty::FreshIntTy(v) => write!(f, "FreshIntTy({})", v),
             ty::FreshFloatTy(v) => write!(f, "FreshFloatTy({})", v)
index b8883e4661eaa0b0578139a2df327580c86a82e5..47e1c09f380b89d6601257017e709657766ab559 100644 (file)
@@ -12,7 +12,7 @@ fn main() {
     let _x: i32 = [1, 2, 3];
     //~^ ERROR mismatched types
     //~| expected type `i32`
-    //~| found type `[{numeric}; 3]`
+    //~| found type `[{integer}; 3]`
     //~| expected i32, found array of 3 elements
 
     let x: &[i32] = &[1, 2, 3];
index 3b6221f0df5b8fed24af3913e373299cd5779520..5547d19868d34e2340473e9fc480a8092a59e9ae 100644 (file)
@@ -11,6 +11,6 @@
 static i: String = 10;
 //~^ ERROR mismatched types
 //~| expected type `std::string::String`
-//~| found type `{numeric}`
+//~| found type `{integer}`
 //~| expected struct `std::string::String`, found integral variable
 fn main() { println!("{}", i); }
index 91222e58b78cc1608fc5980c4d0110e46a46aa53..86702a7463fd0872957e6f96f79c4462c512d3ec 100644 (file)
@@ -15,6 +15,6 @@ fn main() {
     f(&x);
     //~^ ERROR mismatched types
     //~| expected type `&mut i32`
-    //~| found type `&{numeric}`
+    //~| found type `&{integer}`
     //~| values differ in mutability
 }
index bfec84993961e4dd323007e6b2cab652fb0510d4..a619f33468f4a94e068fe70d6a8aa26da03c6312 100644 (file)
@@ -14,6 +14,6 @@ fn main() {
     let _: &[i32] = [0];
     //~^ ERROR mismatched types
     //~| expected type `&[i32]`
-    //~| found type `[{numeric}; 1]`
+    //~| found type `[{integer}; 1]`
     //~| expected &-ptr, found array of 1 elements
 }
index 3ae95a72abdd9d36f7ed0c83469a2bba8bf02468..1a7ceb2e7639e72392f34b352af61f0bd621e0c1 100644 (file)
@@ -15,6 +15,6 @@ fn main() {
     x = 5;
     //~^ ERROR mismatched types
     //~| expected type `std::option::Option<usize>`
-    //~| found type `{numeric}`
+    //~| found type `{integer}`
     //~| expected enum `std::option::Option`, found integral variable
 }
index 394a6fb30d7e98b6ba3fac2163b7e8a280725734..40013a7ee43bb142495a317c1f5640b401209aa4 100644 (file)
@@ -12,7 +12,7 @@ fn main() {
     if let Some(b) = None { //~ ERROR: `if let` arms have incompatible types
         //~^ expected (), found integral variable
         //~| expected type `()`
-        //~| found type `{numeric}`
+        //~| found type `{integer}`
         ()
     } else {                //~ NOTE: `if let` arm with an incompatible type
         1
index fe29a840f28c7706e76ad994d3d41073a8b2a94b..61d54b3f8e4fdf407ce95120cc313d55d0dbc2ef 100644 (file)
@@ -13,7 +13,7 @@
 
 fn main() {
     fn bar<T>(_: T) {}
-    [0][0u8]; //~ ERROR: `[{numeric}]: std::ops::Index<u8>` is not satisfied
+    [0][0u8]; //~ ERROR: `[{integer}]: std::ops::Index<u8>` is not satisfied
 
     [0][0]; // should infer to be a usize
 
index 9dd3772c10cd904c224664d5a7912113e788e79b..f2686ae4d196b432751df2d1abaffa2d7ab55b78 100644 (file)
@@ -12,7 +12,7 @@ fn main() {
     let mut x = 2;
     x = 5.0;
     //~^ ERROR mismatched types
-    //~| expected type `{numeric}`
-    //~| found type `{numeric}`
+    //~| expected type `{integer}`
+    //~| found type `{float}`
     //~| expected integral variable, found floating-point variable
 }
index b1a5adb313face7f9ea68fee9e83553142c05f0b..abddf6ba7a38d4550392a514e56cc7d51e45820e 100644 (file)
@@ -17,13 +17,13 @@ pub fn main() {
     let _x: usize = match Some(1) {
         Ok(u) => u,
         //~^ ERROR mismatched types
-        //~| expected type `std::option::Option<{numeric}>`
+        //~| expected type `std::option::Option<{integer}>`
         //~| found type `std::result::Result<_, _>`
         //~| expected enum `std::option::Option`, found enum `std::result::Result`
 
         Err(e) => panic!(e)
         //~^ ERROR mismatched types
-        //~| expected type `std::option::Option<{numeric}>`
+        //~| expected type `std::option::Option<{integer}>`
         //~| found type `std::result::Result<_, _>`
         //~| expected enum `std::option::Option`, found enum `std::result::Result`
     };
index 2438c86a57c7f713e2a4695f40042cc65e6bb578..3ea136aca4becdc9da48b09ef452906a7377e5d9 100644 (file)
@@ -14,5 +14,5 @@
 fn main() {
     // FIXME (#22405): Replace `Box::new` with `box` here when/if possible.
     (|| Box::new(*(&[0][..])))();
-    //~^ ERROR `[{numeric}]: std::marker::Sized` is not satisfied
+    //~^ ERROR `[{integer}]: std::marker::Sized` is not satisfied
 }
index 77a83a608213d1a27673320f1867e80b7a68f2fc..e07dfaf9fe59e1d7296c159925bd98f3ac7ed804 100644 (file)
@@ -14,7 +14,7 @@
 fn main() {
     if let Some(homura) = Some("madoka") { //~  ERROR missing an else clause
                                            //~| expected type `()`
-                                           //~| found type `{numeric}`
+                                           //~| found type `{integer}`
                                            //~| expected (), found integral variable
         765
     };
index f2d24f3998cc22505dde6313c321a03656d64585..22772e596b19ec19a68c607ef399bc903502504b 100644 (file)
@@ -11,7 +11,7 @@
 macro_rules! macro_panic {
     ($not_a_function:expr, $some_argument:ident) => {
         $not_a_function($some_argument)
-        //~^ ERROR expected function, found `{numeric}`
+        //~^ ERROR expected function, found `{integer}`
     }
 }
 
index 65bfeed20eaa04c81654316afc8c9a9b408103cf..b1f668d9c5e217f8ac1b085ff8a1b3022be4842a 100644 (file)
@@ -14,7 +14,7 @@ fn main() {
     } else if false {
 //~^ ERROR if may be missing an else clause
 //~| expected type `()`
-//~| found type `{numeric}`
+//~| found type `{integer}`
 //~| expected (), found integral variable
         1
     };
index e929f0cb3113d2e090513871feef615f41812e69..77588e5c221fd38a554989388f01c1e028b83509 100644 (file)
@@ -14,7 +14,7 @@
 fn main() {
     match 42 { A => () }
     //~^ ERROR mismatched types
-    //~| expected type `{numeric}`
+    //~| expected type `{integer}`
     //~| found type `(isize, isize)`
     //~| expected integral variable, found tuple
 }
index 95ba2308bfb90667ee77d3978e8315206792ebf5..ed465117344d407e682d5deabf14f9c70d9999ea 100644 (file)
@@ -25,12 +25,12 @@ fn main() {
     match &Some(42) {
         Some(x) => (),
         //~^ ERROR mismatched types
-        //~| expected type `&std::option::Option<{numeric}>`
+        //~| expected type `&std::option::Option<{integer}>`
         //~| found type `std::option::Option<_>`
         //~| expected &-ptr, found enum `std::option::Option`
         None => ()
         //~^ ERROR mismatched types
-        //~| expected type `&std::option::Option<{numeric}>`
+        //~| expected type `&std::option::Option<{integer}>`
         //~| found type `std::option::Option<_>`
         //~| expected &-ptr, found enum `std::option::Option`
     }
index 93723ae9f237cc67820fa28fd1c4c447c9ea997e..a455a7b2d5d0f7b190f06542bc91619c4cf919e4 100644 (file)
@@ -21,5 +21,5 @@ fn take_param<T:Foo>(foo: &T) { }
 fn main() {
     let x: Box<_> = box 3;
     take_param(&x);
-    //~^ ERROR `Box<{numeric}>: std::marker::Copy` is not satisfied
+    //~^ ERROR `Box<{integer}>: std::marker::Copy` is not satisfied
 }
index 30386a589837abe6b7aee754e58dff23172ce616..f89b3e39390d31de8b22d29cbea8c112ede25b71 100644 (file)
@@ -20,7 +20,7 @@ fn main() {
         10 ... "what" => ()
     };
     //~^^ ERROR only char and numeric types are allowed in range
-    //~| start type: {numeric}
+    //~| start type: {integer}
     //~| end type: &'static str
 
     match 5 {
@@ -28,6 +28,6 @@ fn main() {
         _ => { }
     };
     //~^^^ ERROR mismatched types
-    //~| expected type `_`
+    //~| expected type `{integer}`
     //~| found type `char`
 }
index 94ac49e8f60d3f1c6628512f76f107462272559b..596cec167c218ac2ce674d1c7366c571143f2ce2 100644 (file)
@@ -18,7 +18,7 @@ fn main() {
     };
 
     match &[0, 1, 2] {
-        [..] => {} //~ ERROR expected an array or slice, found `&[{numeric}; 3]`
+        [..] => {} //~ ERROR expected an array or slice, found `&[{integer}; 3]`
     };
 
     match &[0, 1, 2] {
index 5596fb7c807997e6a51aaeac191adac9edd49c25..03816362d46c34860aef664661f0898315338108 100644 (file)
@@ -24,6 +24,6 @@ fn main() {
                  //~| expected &-ptr, found struct `Foo`
     Foo::bar(&42); //~  ERROR mismatched types
                       //~| expected type `&Foo`
-                      //~| found type `&{numeric}`
+                      //~| found type `&{integer}`
                       //~| expected struct `Foo`, found integral variable
 }
index d1fd0057d294795361ecebf18d5fd174fdd60060..318d121e4c2df45f20ceaecc3fd512f7b00ba203 100644 (file)
@@ -14,7 +14,7 @@ fn main() {
     // (separate lines to ensure the spans are accurate)
 
      let &_ //~  ERROR mismatched types
-            //~| expected type `&mut {numeric}`
+            //~| expected type `&mut {integer}`
             //~| found type `&_`
             //~| values differ in mutability
         = foo;
@@ -23,7 +23,7 @@ fn main() {
     let bar = &1;
     let &_ = bar;
     let &mut _ //~  ERROR mismatched types
-               //~| expected type `&{numeric}`
+               //~| expected type `&{integer}`
                //~| found type `&mut _`
                //~| values differ in mutability
          = bar;
index 7c364e8d6fb561e5d0668452eb9fac79b9472c27..f31d3787334916bffb1565d63bd1eaf5df7067a8 100644 (file)
@@ -15,5 +15,5 @@ fn bar<T: Send>(_: T) {}
 fn main() {
     let x = Rc::new(5);
     bar(x);
-    //~^ ERROR `std::rc::Rc<{numeric}>: std::marker::Send` is not satisfied
+    //~^ ERROR `std::rc::Rc<{integer}>: std::marker::Send` is not satisfied
 }
index 7d69eca5ad58f9be952aac390405c104cce3f68c..dc6833163a478b4f6d2ae342da44ce03d548de93 100644 (file)
@@ -23,5 +23,5 @@ pub fn main() {
     // Unsized type.
     let arr: &[_] = &[1, 2, 3];
     let range = *arr..;
-    //~^ ERROR `[{numeric}]: std::marker::Sized` is not satisfied
+    //~^ ERROR `[{integer}]: std::marker::Sized` is not satisfied
 }
index 1bdd24abe8183331ad3f9acf5d91794e4c7b1ff0..1758b28a32482555bb6911420f996ced91ed6330 100644 (file)
@@ -28,7 +28,7 @@ fn main() {
     let d = [0; 0.5];
     //~^ ERROR mismatched types
     //~| expected type `usize`
-    //~| found type `{numeric}`
+    //~| found type `{float}`
     //~| expected usize, found floating-point variable
     //~| ERROR expected usize for repeat count, found float [E0306]
     let e = [0; "foo"];
index 589876a7f5ff10a9126f1ba6f31af7f4b221c0d2..2eba7c2e534e15abc2458d34ae90644577c5d0cf 100644 (file)
@@ -16,8 +16,8 @@ fn main() {
     match Foo(1.1, marker::PhantomData) {
         1 => {}
     //~^ ERROR mismatched types
-    //~| expected type `Foo<{numeric}, _>`
-    //~| found type `{numeric}`
+    //~| expected type `Foo<{float}, _>`
+    //~| found type `{integer}`
     //~| expected struct `Foo`, found integral variable
     }
 
index 1fb93bd790912883df8eaf2af51cd80b5605faac..2b2c23a3ce4e92c88fee61c0c242775e1a65cc7d 100644 (file)
@@ -10,5 +10,5 @@
 
 pub fn main() {
     let s: &str = "hello";
-    let c: u8 = s[4]; //~ ERROR `str: std::ops::Index<{numeric}>` is not satisfied
+    let c: u8 = s[4]; //~ ERROR `str: std::ops::Index<{integer}>` is not satisfied
 }
index 9624af488dd89ef8cce18f7974ba3772a437a25a..7e5510edb2c3377707469ca08fe23b0021103be2 100644 (file)
@@ -24,6 +24,6 @@ fn main() {
                                //~| expected struct `Foo`, found struct `Bar`
     let f__isize = Foo { a: 2, ..4 }; //~  ERROR mismatched types
                                  //~| expected type `Foo`
-                                 //~| found type `{numeric}`
+                                 //~| found type `{integer}`
                                  //~| expected struct `Foo`, found integral variable
 }
index 89b57f3dcd325f9498172bc0a39d13f5be0be2d4..3703b15d4db836395e3407e816713d3a67ad4dc4 100644 (file)
@@ -23,7 +23,7 @@ struct Bar { x: isize }
                                        //~| expected struct `Foo`, found struct `Bar`
 static foo_i: Foo = Foo { a: 2, ..4 }; //~  ERROR mismatched types
                                        //~| expected type `Foo`
-                                       //~| found type `{numeric}`
+                                       //~| found type `{integer}`
                                        //~| expected struct `Foo`, found integral variable
 
 fn main() {
index 97a99cb3ce7ccf6d2e7998bb643bed0f66283e2f..777746a189c5feee96df9857b887b4e1bb824472 100644 (file)
@@ -26,5 +26,5 @@ fn is_ee<T: Combo>(t: T) {
 
 fn main() {
     is_ee(4);
-    //~^ ERROR overflow evaluating the requirement `{numeric}: Tweedle
+    //~^ ERROR overflow evaluating the requirement `{integer}: Tweedle
 }
index 09dc9aaf000e85cd666e63e7beee33a0918a96cc..a71f441029472229b37f3e0af7a09b5ea105a9a7 100644 (file)
@@ -16,7 +16,7 @@ fn main() {
     let y = first ((1,2.0,3));
     //~^ ERROR mismatched types
     //~| expected type `(isize, f64)`
-    //~| found type `(isize, f64, {numeric})`
+    //~| found type `(isize, f64, {integer})`
     //~| expected a tuple with 2 elements, found one with 3 elements
 
     let y = first ((1,));
index 4a9d59ea0ed7ffa26de98c42db71ee188817895f..4597cf3d350c4167af32c3c32204cbd7ddaf9379 100644 (file)
@@ -20,5 +20,5 @@ fn main() {
     tuple.0;
     tuple.1;
     tuple.2;
-    //~^ ERROR attempted out-of-bounds tuple index `2` on type `({numeric}, {numeric})`
+    //~^ ERROR attempted out-of-bounds tuple index `2` on type `({integer}, {integer})`
 }
index 681b3a559c2b8418c83d68dc587e780778eb6211..9359c03595669a659160821689c8d16bd3f5b9e4 100644 (file)
@@ -13,7 +13,7 @@
 fn main() { let a: bool = 1; let b: i32 = true; }
 //~^ ERROR mismatched types
 //~| expected type `bool`
-//~| found type `{numeric}`
+//~| found type `{integer}`
 //~| expected bool, found integral variable
 //~| ERROR mismatched types
 //~| expected i32, found bool
index 50b8ae7e48cdc19ae58c546627609a92ae305ccb..f0172777cdabb4e5828e6370afe614b5d5851390 100644 (file)
@@ -27,7 +27,7 @@ fn test<T: Sync>(s: T) {}
 fn main() {
     let us = UnsafeCell::new(MySync{u: UnsafeCell::new(0)});
     test(us);
-    //~^ ERROR `std::cell::UnsafeCell<MySync<{numeric}>>: std::marker::Sync` is not satisfied
+    //~^ ERROR `std::cell::UnsafeCell<MySync<{integer}>>: std::marker::Sync` is not satisfied
 
     let uns = UnsafeCell::new(NoSync);
     test(uns);
index 936b23075eb983606b2f2ec847aa0b99a03304c8..8b3e9369ece46d12e19234da3379b039a6ad006f 100644 (file)
@@ -24,7 +24,7 @@ fn gimme_an_a<A:TraitA>(&self, a: A) -> isize {
 
 fn call_it<B:TraitB>(b: B)  -> isize {
     let y = 4;
-    b.gimme_an_a(y) //~ ERROR `{numeric}: TraitA` is not satisfied
+    b.gimme_an_a(y) //~ ERROR `{integer}: TraitA` is not satisfied
 }
 
 fn main() {
index 3a8d9a16398d1d9e7029c4c13587d29f11ba1833..45638a65915c49901430f6a63d556b5aa0c13d28 100644 (file)
@@ -5,7 +5,7 @@ error[E0308]: mismatched types
    |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected u64, found usize
 $DIR/issue-26480.rs:38:5: 38:19 note: in this expansion of write! (defined in $DIR/issue-26480.rs)
 
-error: non-scalar cast: `{numeric}` as `()`
+error: non-scalar cast: `{integer}` as `()`
   --> $DIR/issue-26480.rs:33:19
    |
 33 |     ($x:expr) => ($x as ())