Fix expected parse error

This commit is contained in:
Jared Roesch 2015-08-05 14:18:29 -07:00
parent 471370a16b
commit 83e43bb728
8 changed files with 9 additions and 8 deletions

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

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

@ -10,4 +10,5 @@
// compile-flags: -Z parse-only
type closure = Box<lt/fn()>; //~ ERROR expected one of `(`, `+`, `,`, `::`, `<`, or `>`, found `/`
type closure = Box<lt/fn()>;
//~^ 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

@ -12,4 +12,4 @@
type v = [mut isize];
//~^ ERROR expected identifier, found keyword `mut`
//~^^ ERROR expected one of `(`, `+`, `::`, `;`, `<`, or `]`, found `isize`
//~^^ ERROR expected one of `!`, `(`, `+`, `::`, `;`, `<`, or `]`, found `isize`

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

@ -12,4 +12,4 @@
type mut_box = Box<mut isize>;
//~^ ERROR expected identifier, found keyword `mut`
//~^^ ERROR expected one of `(`, `+`, `,`, `::`, `<`, or `>`, found `isize`
//~^^ ERROR expected one of `!`, `(`, `+`, `,`, `::`, `<`, or `>`, found `isize`