Fix compile-fail error messages after integer suffix removal.

This commit is contained in:
Eduard Burtescu 2015-03-04 15:48:33 +02:00 committed by Manish Goregaokar
parent e64670888a
commit 34410ec748
16 changed files with 26 additions and 26 deletions

View file

@ -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

View file

@ -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); }

View file

@ -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; }

View file

@ -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
}

View file

@ -37,7 +37,7 @@ fn main() {
check((3, 5));
//~^ ERROR mismatched types
//~| expected `&_`
//~| found `(usize, usize)`
//~| found `(_, _)`
//~| expected &-ptr
//~| found tuple
}

View file

@ -17,14 +17,14 @@ pub fn main() {
let _x: usize = match Some(1) {
Ok(u) => u,
//~^ ERROR mismatched types
//~| expected `core::option::Option<usize>`
//~| 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<usize>`
//~| expected `core::option::Option<_>`
//~| found `core::result::Result<_, _>`
//~| expected enum `core::option::Option`
//~| found enum `core::result::Result`

View file

@ -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

View file

@ -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
}

View file

@ -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 `[_]`
}

View file

@ -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
};
}

View file

@ -26,13 +26,13 @@ fn main() {
match &Some(42) {
Some(x) => (),
//~^ ERROR mismatched types
//~| expected `&core::option::Option<i32>`
//~| expected `&core::option::Option<_>`
//~| found `core::option::Option<_>`
//~| expected &-ptr
//~| found enum `core::option::Option`
None => ()
//~^ ERROR mismatched types
//~| expected `&core::option::Option<i32>`
//~| expected `&core::option::Option<_>`
//~| found `core::option::Option<_>`
//~| expected &-ptr
//~| found enum `core::option::Option`

View file

@ -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
}

View file

@ -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;

View file

@ -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::<f32> {
//~^ 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::<i32> {
//~^ ERROR structure constructor specifies a structure of type
//~| expected f32
//~| found i32
//~| found integral variable
x: 7,
y: 8,
};

View file

@ -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 `(_, _)`
}

View file

@ -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`