Skip to content

Commit

Permalink
libsyntax: fix parse fail tests.
Browse files Browse the repository at this point in the history
Some tests now stop early, and produce only one error message
  • Loading branch information
matklad committed Sep 16, 2015
1 parent d636258 commit 95a87ba
Show file tree
Hide file tree
Showing 9 changed files with 0 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ pub trait Foo<T> {

fn foo2<I>(x: <I as for<'x> Foo<&'x isize>>::A)
//~^ ERROR expected identifier, found keyword `for`
//~| ERROR expected one of `::` or `>`
{
}

Expand Down
1 change: 0 additions & 1 deletion src/test/parse-fail/keywords-followed-by-double-colon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,4 @@

fn main() {
struct::foo(); //~ ERROR expected identifier
mut::baz(); //~ ERROR expected identifier
}
1 change: 0 additions & 1 deletion src/test/parse-fail/removed-syntax-field-let.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@
struct s {
let foo: (),
//~^ ERROR expected identifier, found keyword `let`
//~^^ ERROR expected `:`, found `foo`
}
1 change: 0 additions & 1 deletion src/test/parse-fail/removed-syntax-mut-vec-expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@
fn f() {
let v = [mut 1, 2, 3, 4];
//~^ ERROR expected identifier, found keyword `mut`
//~^^ ERROR expected one of `!`, `,`, `.`, `::`, `;`, `]`, `{`, or an operator, found `1`
}
1 change: 0 additions & 1 deletion src/test/parse-fail/removed-syntax-mut-vec-ty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@

type v = [mut isize];
//~^ ERROR expected identifier, found keyword `mut`
//~^^ ERROR expected one of `!`, `(`, `+`, `::`, `;`, `<`, or `]`, found `isize`
1 change: 0 additions & 1 deletion src/test/parse-fail/removed-syntax-uniq-mut-expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@
fn f() {
let a_box = box mut 42;
//~^ ERROR expected identifier, found keyword `mut`
//~^^ ERROR expected one of `!`, `.`, `::`, `;`, `{`, or an operator, found `42`
}
1 change: 0 additions & 1 deletion src/test/parse-fail/removed-syntax-uniq-mut-ty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@

type mut_box = Box<mut isize>;
//~^ ERROR expected identifier, found keyword `mut`
//~^^ ERROR expected one of `!`, `(`, `+`, `,`, `::`, `<`, or `>`, found `isize`
2 changes: 0 additions & 2 deletions src/test/parse-fail/unsized2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,4 @@ fn f<X>() {}
pub fn main() {
f<type>();
//~^ ERROR expected identifier, found keyword `type`
//~^^ ERROR: chained comparison
//~^^^ HELP: use `::<
}
1 change: 0 additions & 1 deletion src/test/parse-fail/use-as-where-use-ends-with-mod-sep.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@
// compile-flags: -Z parse-only

use std::any:: as foo; //~ ERROR expected identifier, found keyword `as`
//~^ ERROR: expected one of `::`, `;`, or `as`, found `foo`

0 comments on commit 95a87ba

Please sign in to comment.