Fix affected tests

This commit is contained in:
Esteban Küber 2017-06-11 23:49:28 -07:00
parent 3a7dbf48fe
commit 5fcfa08e98
10 changed files with 14 additions and 13 deletions

View File

@ -2851,7 +2851,8 @@ impl<'a> Parser<'a> {
_ => "a type".to_string(),
};
err.span_suggestion(suggestion_span,
"if you want to compare the casted value then write",
"if you want to compare the casted value \
then write:",
suggestion);
err.level = Level::Warning;
err.set_message(&format!("`<` is interpreted as a start of generic \

View File

@ -11,5 +11,5 @@
// compile-flags: -Z parse-only
fn main() {
let x: [isize 3]; //~ ERROR expected one of `!`, `(`, `+`, `::`, `;`, `<`, or `]`, found `3`
let x: [isize 3]; //~ ERROR expected one of `!`, `(`, `+`, `::`, `;`, or `]`, found `3`
}

View File

@ -18,6 +18,6 @@ type A where T: Trait + Trait = u8; // OK
type A where = u8; // OK
type A where T: Trait + = u8; // OK
type A where T, = u8;
//~^ ERROR expected one of `!`, `(`, `+`, `::`, `:`, `<`, `==`, or `=`, found `,`
//~^ ERROR expected one of `!`, `(`, `+`, `::`, `:`, `==`, or `=`, found `,`
fn main() {}

View File

@ -13,5 +13,5 @@
fn main() {
let x = || -> i32 22;
//~^ ERROR expected one of `!`, `(`, `::`, `<`, or `{`, found `22`
//~^ ERROR expected one of `!`, `(`, `::`, or `{`, found `22`
}

View File

@ -10,4 +10,4 @@
// compile-flags: -Z parse-only
impl Foo; //~ ERROR expected one of `!`, `(`, `+`, `::`, `<`, `for`, `where`, or `{`, found `;`
impl Foo; //~ ERROR expected one of `!`, `(`, `+`, `::`, `for`, `where`, or `{`, found `;`

View File

@ -15,7 +15,7 @@ struct S {
}
impl Cmp, ToString for S {
//~^ ERROR: expected one of `!`, `(`, `+`, `::`, `<`, `for`, `where`, or `{`, found `,`
//~^ ERROR: expected one of `!`, `(`, `+`, `::`, `for`, `where`, or `{`, found `,`
fn eq(&&other: S) { false }
fn to_string(&self) -> String { "hi".to_string() }
}

View File

@ -11,4 +11,4 @@
// compile-flags: -Z parse-only
type closure = Box<lt/fn()>;
//~^ ERROR expected one of `!`, `(`, `+`, `,`, `::`, `<`, or `>`, found `/`
//~^ ERROR expected one of `!`, `(`, `+`, `,`, `::`, or `>`, found `/`

View File

@ -10,4 +10,4 @@
// compile-flags: -Z parse-only
type v = [isize * 3]; //~ ERROR expected one of `!`, `(`, `+`, `::`, `;`, `<`, or `]`, found `*`
type v = [isize * 3]; //~ ERROR expected one of `!`, `(`, `+`, `::`, `;`, or `]`, found `*`

View File

@ -10,4 +10,4 @@
// compile-flags: -Z parse-only
type bptr = &lifetime/isize; //~ ERROR expected one of `!`, `(`, `::`, `;`, or `<`, found `/`
type bptr = &lifetime/isize; //~ ERROR expected one of `!`, `(`, `::`, or `;`, found `/`

View File

@ -1,13 +1,13 @@
warning: `<` is interpreted as a start of generic arguments for `usize`, not comparison
warning: `<` is interpreted as a start of generic arguments for `usize`, not a comparison
--> $DIR/issue-22644.rs:16:33
|
16 | println!("{}", a as usize < b);
| ^ expected one of `!`, `(`, `+`, `,`, `::`, or `>` here
|
help: if you want to compare the casted value then write
help: if you want to compare the casted value then write:
| println!("{}", (a as usize) < b);
warning: `<` is interpreted as a start of generic arguments for `usize`, not comparison
warning: `<` is interpreted as a start of generic arguments for `usize`, not a comparison
--> $DIR/issue-22644.rs:17:33
|
17 | println!("{}", a as usize < 4);
@ -15,6 +15,6 @@ warning: `<` is interpreted as a start of generic arguments for `usize`, not com
| |
| expected one of `>`, identifier, lifetime, or type here
|
help: if you want to compare the casted value then write
help: if you want to compare the casted value then write:
| println!("{}", (a as usize) < 4);