add -Z continue-parse-after-error to parse-fail tests
The new handling fixed a latent bug in the parser error handling where it would only abort after the second error (when configured to stop after the first error). This is because the check for `error_count != 0` was occuring before the increment. Since the increment is tied to the `emit()` call now this no longer occurs.
This commit is contained in:
parent
ad46ad6a77
commit
6236ee14af
@ -8,7 +8,7 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
// compile-flags: -Z parse-only
|
// compile-flags: -Z parse-only -Z continue-parse-after-error
|
||||||
|
|
||||||
// Test you can't use a higher-ranked trait bound inside of a qualified
|
// Test you can't use a higher-ranked trait bound inside of a qualified
|
||||||
// path (just won't parse).
|
// path (just won't parse).
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
// compile-flags: -Z parse-only
|
// compile-flags: -Z parse-only -Z continue-parse-after-error
|
||||||
|
|
||||||
struct Heap;
|
struct Heap;
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
// compile-flags: -Z parse-only
|
// compile-flags: -Z parse-only -Z continue-parse-after-error
|
||||||
|
|
||||||
struct Baz<U> where U: Eq(U); //This is parsed as the new Fn* style parenthesis syntax.
|
struct Baz<U> where U: Eq(U); //This is parsed as the new Fn* style parenthesis syntax.
|
||||||
struct Baz<U> where U: Eq(U) -> R; // Notice this parses as well.
|
struct Baz<U> where U: Eq(U) -> R; // Notice this parses as well.
|
||||||
|
@ -8,6 +8,8 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
|
// compile-flags: -Z parse-only -Z continue-parse-after-error
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
0o18; //~ ERROR invalid digit for a base 8 literal
|
0o18; //~ ERROR invalid digit for a base 8 literal
|
||||||
0o1234_9_5670; //~ ERROR invalid digit for a base 8 literal
|
0o1234_9_5670; //~ ERROR invalid digit for a base 8 literal
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
// compile-flags: -Z parse-only
|
// compile-flags: -Z parse-only -Z continue-parse-after-error
|
||||||
|
|
||||||
fn foo<'a>(a: &'a isize) { }
|
fn foo<'a>(a: &'a isize) { }
|
||||||
fn bar(a: &'static isize) { }
|
fn bar(a: &'static isize) { }
|
||||||
|
@ -8,10 +8,10 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
// compile-flags: -Z parse-only
|
// compile-flags: -Z parse-only -Z continue-parse-after-error
|
||||||
|
|
||||||
|
|
||||||
pub fn main() {
|
pub fn main() {
|
||||||
br"é"; //~ raw byte string must be ASCII
|
br"é"; //~ ERROR raw byte string must be ASCII
|
||||||
br##~"a"~##; //~ only `#` is allowed in raw string delimitation
|
br##~"a"~##; //~ ERROR only `#` is allowed in raw string delimitation
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
// compile-flags: -Z parse-only
|
// compile-flags: -Z parse-only -Z continue-parse-after-error
|
||||||
|
|
||||||
struct s {
|
struct s {
|
||||||
let foo: (),
|
let foo: (),
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
// compile-flags: -Z parse-only
|
// compile-flags: -Z parse-only -Z continue-parse-after-error
|
||||||
|
|
||||||
#![feature(optin_builtin_traits)]
|
#![feature(optin_builtin_traits)]
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
// compile-flags: -Z parse-only
|
// compile-flags: -Z parse-only -Z continue-parse-after-error
|
||||||
|
|
||||||
use std::fmt::Debug;
|
use std::fmt::Debug;
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
// compile-flags: -Z parse-only
|
// compile-flags: -Z parse-only -Z continue-parse-after-error
|
||||||
|
|
||||||
trait Foo {
|
trait Foo {
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
// compile-flags: -Z parse-only
|
// compile-flags: -Z parse-only -Z continue-parse-after-error
|
||||||
|
|
||||||
use std::any:: as foo; //~ ERROR expected identifier, found keyword `as`
|
use std::any:: as foo; //~ ERROR expected identifier, found keyword `as`
|
||||||
//~^ ERROR: expected one of `::`, `;`, or `as`, found `foo`
|
//~^ ERROR: expected one of `::`, `;`, or `as`, found `foo`
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
// compile-flags: -Z parse-only
|
// compile-flags: -Z parse-only -Z continue-parse-after-error
|
||||||
|
|
||||||
fn equal1<T>(_: &T, _: &T) -> bool where {
|
fn equal1<T>(_: &T, _: &T) -> bool where {
|
||||||
//~^ ERROR a `where` clause must have at least one predicate in it
|
//~^ ERROR a `where` clause must have at least one predicate in it
|
||||||
|
Loading…
Reference in New Issue
Block a user