Skip to content

Commit 95a87ba

Browse files
committed
libsyntax: fix parse fail tests.
Some tests now stop early, and produce only one error message
1 parent d636258 commit 95a87ba

9 files changed

+0
-10
lines changed

src/test/parse-fail/associated-types-project-from-hrtb-explicit.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ pub trait Foo<T> {
2121

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

src/test/parse-fail/keywords-followed-by-double-colon.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,4 @@
1212

1313
fn main() {
1414
struct::foo(); //~ ERROR expected identifier
15-
mut::baz(); //~ ERROR expected identifier
1615
}

src/test/parse-fail/removed-syntax-field-let.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,4 @@
1313
struct s {
1414
let foo: (),
1515
//~^ ERROR expected identifier, found keyword `let`
16-
//~^^ ERROR expected `:`, found `foo`
1716
}

src/test/parse-fail/removed-syntax-mut-vec-expr.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,4 @@
1313
fn f() {
1414
let v = [mut 1, 2, 3, 4];
1515
//~^ ERROR expected identifier, found keyword `mut`
16-
//~^^ ERROR expected one of `!`, `,`, `.`, `::`, `;`, `]`, `{`, or an operator, found `1`
1716
}

src/test/parse-fail/removed-syntax-mut-vec-ty.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,3 @@
1212

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

src/test/parse-fail/removed-syntax-uniq-mut-expr.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,4 @@
1313
fn f() {
1414
let a_box = box mut 42;
1515
//~^ ERROR expected identifier, found keyword `mut`
16-
//~^^ ERROR expected one of `!`, `.`, `::`, `;`, `{`, or an operator, found `42`
1716
}

src/test/parse-fail/removed-syntax-uniq-mut-ty.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,3 @@
1212

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

src/test/parse-fail/unsized2.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,4 @@ fn f<X>() {}
1717
pub fn main() {
1818
f<type>();
1919
//~^ ERROR expected identifier, found keyword `type`
20-
//~^^ ERROR: chained comparison
21-
//~^^^ HELP: use `::<
2220
}

src/test/parse-fail/use-as-where-use-ends-with-mod-sep.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,3 @@
1111
// compile-flags: -Z parse-only
1212

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

0 commit comments

Comments
 (0)