Skip to content

Commit 48fba76

Browse files
committed
Fix compile-fail error messages after integer suffix removal.
1 parent 8e50853 commit 48fba76

16 files changed

+26
-26
lines changed

src/test/compile-fail/array-not-vector.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ fn main() {
1212
let _x: i32 = [1, 2, 3];
1313
//~^ ERROR mismatched types
1414
//~| expected `i32`
15-
//~| found `[i32; 3]`
15+
//~| found `[_; 3]`
1616
//~| expected i32
1717
//~| found array of 3 elements
1818

src/test/compile-fail/bad-const-type.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
static i: String = 10;
1212
//~^ ERROR mismatched types
1313
//~| expected `collections::string::String`
14-
//~| found `i32`
14+
//~| found `_`
1515
//~| expected struct `collections::string::String`
16-
//~| found i32
16+
//~| found integral variable
1717
fn main() { println!("{}", i); }

src/test/compile-fail/binop-logic-int.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// error-pattern:`&&` cannot be applied to type `i32`
11+
// error-pattern:`&&` cannot be applied to type `_`
1212

1313
fn main() { let x = 1 && 2; }

src/test/compile-fail/coercion-slice.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ fn main() {
1414
let _: &[i32] = [0];
1515
//~^ ERROR mismatched types
1616
//~| expected `&[i32]`
17-
//~| found `[i32; 1]`
17+
//~| found `[_; 1]`
1818
//~| expected &-ptr
1919
//~| found array of 1 elements
2020
}

src/test/compile-fail/issue-13058.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ fn main() {
3737
check((3, 5));
3838
//~^ ERROR mismatched types
3939
//~| expected `&_`
40-
//~| found `(usize, usize)`
40+
//~| found `(_, _)`
4141
//~| expected &-ptr
4242
//~| found tuple
4343
}

src/test/compile-fail/issue-13466.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ pub fn main() {
1717
let _x: usize = match Some(1) {
1818
Ok(u) => u,
1919
//~^ ERROR mismatched types
20-
//~| expected `core::option::Option<usize>`
20+
//~| expected `core::option::Option<_>`
2121
//~| found `core::result::Result<_, _>`
2222
//~| expected enum `core::option::Option`
2323
//~| found enum `core::result::Result`
2424

2525
Err(e) => panic!(e)
2626
//~^ ERROR mismatched types
27-
//~| expected `core::option::Option<usize>`
27+
//~| expected `core::option::Option<_>`
2828
//~| found `core::result::Result<_, _>`
2929
//~| expected enum `core::option::Option`
3030
//~| found enum `core::result::Result`

src/test/compile-fail/issue-13482-2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ fn main() {
1515
let y = match x {
1616
[] => None,
1717
//~^ ERROR mismatched types
18-
//~| expected `[_#0; 2]`
18+
//~| expected `[_#0i; 2]`
1919
//~| found `[_#7t; 0]`
2020
//~| expected an array with a fixed size of 2 elements
2121
//~| found one with 0 elements

src/test/compile-fail/issue-14845.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ fn main() {
2626
let _v = &local as *mut u8;
2727
//~^ ERROR mismatched types
2828
//~| expected `*mut u8`
29-
//~| found `&[u8; 1]`
29+
//~| found `&[_; 1]`
3030
//~| expected u8,
3131
//~| found array of 1 elements
3232
}

src/test/compile-fail/issue-17651.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@
1414
fn main() {
1515
// FIXME (#22405): Replace `Box::new` with `box` here when/if possible.
1616
(|| Box::new(*[0].as_slice()))();
17-
//~^ ERROR the trait `core::marker::Sized` is not implemented for the type `[usize]`
17+
//~^ ERROR the trait `core::marker::Sized` is not implemented for the type `[_]`
1818
}

src/test/compile-fail/issue-19991.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
fn main() {
1515
if let Some(homura) = Some("madoka") { //~ ERROR missing an else clause
1616
//~| expected `()`
17-
//~| found `i32`
17+
//~| found `_`
1818
//~| expected ()
19-
//~| found i32
19+
//~| found integral variable
2020
765
2121
};
2222
}

0 commit comments

Comments
 (0)