diff --git a/src/test/compile-fail/array-not-vector.rs b/src/test/compile-fail/array-not-vector.rs index 81883108a2b5..6c9b8f81b2fa 100644 --- a/src/test/compile-fail/array-not-vector.rs +++ b/src/test/compile-fail/array-not-vector.rs @@ -12,7 +12,7 @@ fn main() { let _x: i32 = [1, 2, 3]; //~^ ERROR mismatched types //~| expected `i32` - //~| found `[i32; 3]` + //~| found `[_; 3]` //~| expected i32 //~| found array of 3 elements diff --git a/src/test/compile-fail/bad-const-type.rs b/src/test/compile-fail/bad-const-type.rs index 93ff7c08f791..a9e5c957b89d 100644 --- a/src/test/compile-fail/bad-const-type.rs +++ b/src/test/compile-fail/bad-const-type.rs @@ -11,7 +11,7 @@ static i: String = 10; //~^ ERROR mismatched types //~| expected `collections::string::String` -//~| found `i32` +//~| found `_` //~| expected struct `collections::string::String` -//~| found i32 +//~| found integral variable fn main() { println!("{}", i); } diff --git a/src/test/compile-fail/binop-logic-int.rs b/src/test/compile-fail/binop-logic-int.rs index 1a3db3888773..d5dd9e00902f 100644 --- a/src/test/compile-fail/binop-logic-int.rs +++ b/src/test/compile-fail/binop-logic-int.rs @@ -8,6 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// error-pattern:`&&` cannot be applied to type `i32` +// error-pattern:`&&` cannot be applied to type `_` fn main() { let x = 1 && 2; } diff --git a/src/test/compile-fail/coercion-slice.rs b/src/test/compile-fail/coercion-slice.rs index 40fbcd556b0b..bb4d1693af7e 100644 --- a/src/test/compile-fail/coercion-slice.rs +++ b/src/test/compile-fail/coercion-slice.rs @@ -14,7 +14,7 @@ fn main() { let _: &[i32] = [0]; //~^ ERROR mismatched types //~| expected `&[i32]` - //~| found `[i32; 1]` + //~| found `[_; 1]` //~| expected &-ptr //~| found array of 1 elements } diff --git a/src/test/compile-fail/issue-13058.rs b/src/test/compile-fail/issue-13058.rs index 6f024fc5382c..50c4ac94d903 100644 --- a/src/test/compile-fail/issue-13058.rs +++ b/src/test/compile-fail/issue-13058.rs @@ -37,7 +37,7 @@ fn main() { check((3, 5)); //~^ ERROR mismatched types //~| expected `&_` -//~| found `(usize, usize)` +//~| found `(_, _)` //~| expected &-ptr //~| found tuple } diff --git a/src/test/compile-fail/issue-13466.rs b/src/test/compile-fail/issue-13466.rs index 3eb42f902f92..a29a83c43063 100644 --- a/src/test/compile-fail/issue-13466.rs +++ b/src/test/compile-fail/issue-13466.rs @@ -17,14 +17,14 @@ pub fn main() { let _x: usize = match Some(1) { Ok(u) => u, //~^ ERROR mismatched types - //~| expected `core::option::Option` + //~| expected `core::option::Option<_>` //~| found `core::result::Result<_, _>` //~| expected enum `core::option::Option` //~| found enum `core::result::Result` Err(e) => panic!(e) //~^ ERROR mismatched types - //~| expected `core::option::Option` + //~| expected `core::option::Option<_>` //~| found `core::result::Result<_, _>` //~| expected enum `core::option::Option` //~| found enum `core::result::Result` diff --git a/src/test/compile-fail/issue-13482-2.rs b/src/test/compile-fail/issue-13482-2.rs index 7af10aa13a8d..86a79416c77b 100644 --- a/src/test/compile-fail/issue-13482-2.rs +++ b/src/test/compile-fail/issue-13482-2.rs @@ -15,7 +15,7 @@ fn main() { let y = match x { [] => None, //~^ ERROR mismatched types -//~| expected `[_#0; 2]` +//~| expected `[_#0i; 2]` //~| found `[_#7t; 0]` //~| expected an array with a fixed size of 2 elements //~| found one with 0 elements diff --git a/src/test/compile-fail/issue-14845.rs b/src/test/compile-fail/issue-14845.rs index 3381b9307146..d7bb806999c7 100644 --- a/src/test/compile-fail/issue-14845.rs +++ b/src/test/compile-fail/issue-14845.rs @@ -26,7 +26,7 @@ fn main() { let _v = &local as *mut u8; //~^ ERROR mismatched types //~| expected `*mut u8` - //~| found `&[u8; 1]` + //~| found `&[_; 1]` //~| expected u8, //~| found array of 1 elements } diff --git a/src/test/compile-fail/issue-17651.rs b/src/test/compile-fail/issue-17651.rs index 723b4ca03e72..8ebf80a8db0d 100644 --- a/src/test/compile-fail/issue-17651.rs +++ b/src/test/compile-fail/issue-17651.rs @@ -14,5 +14,5 @@ fn main() { // FIXME (#22405): Replace `Box::new` with `box` here when/if possible. (|| Box::new(*[0].as_slice()))(); - //~^ ERROR the trait `core::marker::Sized` is not implemented for the type `[usize]` + //~^ ERROR the trait `core::marker::Sized` is not implemented for the type `[_]` } diff --git a/src/test/compile-fail/issue-19991.rs b/src/test/compile-fail/issue-19991.rs index 7c1e18ba9976..6c9b0004f775 100644 --- a/src/test/compile-fail/issue-19991.rs +++ b/src/test/compile-fail/issue-19991.rs @@ -14,9 +14,9 @@ fn main() { if let Some(homura) = Some("madoka") { //~ ERROR missing an else clause //~| expected `()` - //~| found `i32` + //~| found `_` //~| expected () - //~| found i32 + //~| found integral variable 765 }; } diff --git a/src/test/compile-fail/issue-7867.rs b/src/test/compile-fail/issue-7867.rs index 1eaa85c3b7e5..400806c3a5fa 100644 --- a/src/test/compile-fail/issue-7867.rs +++ b/src/test/compile-fail/issue-7867.rs @@ -26,13 +26,13 @@ fn main() { match &Some(42) { Some(x) => (), //~^ ERROR mismatched types - //~| expected `&core::option::Option` + //~| expected `&core::option::Option<_>` //~| found `core::option::Option<_>` //~| expected &-ptr //~| found enum `core::option::Option` None => () //~^ ERROR mismatched types - //~| expected `&core::option::Option` + //~| expected `&core::option::Option<_>` //~| found `core::option::Option<_>` //~| expected &-ptr //~| found enum `core::option::Option` diff --git a/src/test/compile-fail/method-self-arg-1.rs b/src/test/compile-fail/method-self-arg-1.rs index 666812c98bc3..57a96bb9a26e 100644 --- a/src/test/compile-fail/method-self-arg-1.rs +++ b/src/test/compile-fail/method-self-arg-1.rs @@ -25,7 +25,7 @@ fn main() { //~| found struct `Foo` Foo::bar(&42); //~ ERROR mismatched types //~| expected `&Foo` - //~| found `&i32` + //~| found `&_` //~| expected struct `Foo` - //~| found i32 + //~| found integral variable } diff --git a/src/test/compile-fail/mut-pattern-mismatched.rs b/src/test/compile-fail/mut-pattern-mismatched.rs index 1b748624491b..9eb24c81960c 100644 --- a/src/test/compile-fail/mut-pattern-mismatched.rs +++ b/src/test/compile-fail/mut-pattern-mismatched.rs @@ -14,7 +14,7 @@ fn main() { // (separate lines to ensure the spans are accurate) let &_ //~ ERROR mismatched types - //~| expected `&mut i32` + //~| expected `&mut _` //~| found `&_` //~| values differ in mutability = foo; @@ -23,7 +23,7 @@ fn main() { let bar = &1; let &_ = bar; let &mut _ //~ ERROR mismatched types - //~| expected `&i32` + //~| expected `&_` //~| found `&mut _` //~| values differ in mutability = bar; diff --git a/src/test/compile-fail/structure-constructor-type-mismatch.rs b/src/test/compile-fail/structure-constructor-type-mismatch.rs index 4a0006338e6a..ea6d63ca540e 100644 --- a/src/test/compile-fail/structure-constructor-type-mismatch.rs +++ b/src/test/compile-fail/structure-constructor-type-mismatch.rs @@ -26,7 +26,7 @@ fn main() { let pt = PointF { //~^ ERROR structure constructor specifies a structure of type //~| expected f32 - //~| found i32 + //~| found integral variable x: 1, y: 2, }; @@ -34,7 +34,7 @@ fn main() { let pt2 = Point:: { //~^ ERROR structure constructor specifies a structure of type //~| expected f32 - //~| found i32 + //~| found integral variable x: 3, y: 4, }; @@ -42,7 +42,7 @@ fn main() { let pair = PairF { //~^ ERROR structure constructor specifies a structure of type //~| expected f32 - //~| found i32 + //~| found integral variable x: 5, y: 6, }; @@ -50,7 +50,7 @@ fn main() { let pair2 = PairF:: { //~^ ERROR structure constructor specifies a structure of type //~| expected f32 - //~| found i32 + //~| found integral variable x: 7, y: 8, }; diff --git a/src/test/compile-fail/tuple-index-out-of-bounds.rs b/src/test/compile-fail/tuple-index-out-of-bounds.rs index e2a951cab72e..c2c41fbbb2aa 100644 --- a/src/test/compile-fail/tuple-index-out-of-bounds.rs +++ b/src/test/compile-fail/tuple-index-out-of-bounds.rs @@ -20,5 +20,5 @@ fn main() { tuple.0; tuple.1; tuple.2; - //~^ ERROR attempted out-of-bounds tuple index `2` on type `(i32, i32)` + //~^ ERROR attempted out-of-bounds tuple index `2` on type `(_, _)` } diff --git a/src/test/compile-fail/type-mismatch-multiple.rs b/src/test/compile-fail/type-mismatch-multiple.rs index a51a81725433..627300a03772 100644 --- a/src/test/compile-fail/type-mismatch-multiple.rs +++ b/src/test/compile-fail/type-mismatch-multiple.rs @@ -13,9 +13,9 @@ fn main() { let a: bool = 1; let b: i32 = true; } //~^ ERROR mismatched types //~| expected `bool` -//~| found `i32` +//~| found `_` //~| expected bool -//~| found i32 +//~| found integral variable //~| ERROR mismatched types //~| expected `i32` //~| found `bool`