1
Fork 0

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(), _ => "a type".to_string(),
}; };
err.span_suggestion(suggestion_span, 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); suggestion);
err.level = Level::Warning; err.level = Level::Warning;
err.set_message(&format!("`<` is interpreted as a start of generic \ err.set_message(&format!("`<` is interpreted as a start of generic \

View file

@ -11,5 +11,5 @@
// compile-flags: -Z parse-only // compile-flags: -Z parse-only
fn main() { 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 = u8; // OK
type A where T: Trait + = u8; // OK type A where T: Trait + = u8; // OK
type A where T, = u8; type A where T, = u8;
//~^ ERROR expected one of `!`, `(`, `+`, `::`, `:`, `<`, `==`, or `=`, found `,` //~^ ERROR expected one of `!`, `(`, `+`, `::`, `:`, `==`, or `=`, found `,`
fn main() {} fn main() {}

View file

@ -13,5 +13,5 @@
fn main() { fn main() {
let x = || -> i32 22; 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 // 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 { 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 eq(&&other: S) { false }
fn to_string(&self) -> String { "hi".to_string() } fn to_string(&self) -> String { "hi".to_string() }
} }

View file

@ -11,4 +11,4 @@
// compile-flags: -Z parse-only // compile-flags: -Z parse-only
type closure = Box<lt/fn()>; 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 // 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 // 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 --> $DIR/issue-22644.rs:16:33
| |
16 | println!("{}", a as usize < b); 16 | println!("{}", a as usize < b);
| ^ expected one of `!`, `(`, `+`, `,`, `::`, or `>` here | ^ 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); | 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 --> $DIR/issue-22644.rs:17:33
| |
17 | println!("{}", a as usize < 4); 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 | 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); | println!("{}", (a as usize) < 4);