fix compile-fail and parse-fail tests by blindly opting back into
parser recovery (so that expected errors match up) I'm opting into parser recovery in all these cases out of expediency, not because the error messages you get with recovery enabled are actually all that usable in all cases listed.
This commit is contained in:
parent
2646663b5a
commit
e1d8ad3fb0
|
@ -8,6 +8,8 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z continue-parse-after-error
|
||||
|
||||
// For style and consistency reasons, non-parametrized enum variants must
|
||||
// be used simply as `ident` instead of `ident ()`.
|
||||
// This test-case covers enum matching.
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z continue-parse-after-error
|
||||
|
||||
enum bird {
|
||||
pub duck,
|
||||
//~^ ERROR: expected identifier, found keyword `pub`
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z continue-parse-after-error
|
||||
|
||||
macro_rules! parallel {
|
||||
(
|
||||
// If future has `pred`/`moelarry` fragments (where "pred" is
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z continue-parse-after-error
|
||||
|
||||
macro_rules! ignored_item {
|
||||
() => {
|
||||
fn foo() {}
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z continue-parse-after-error
|
||||
|
||||
// Test that the parser is error correcting missing idents. Despite a parsing
|
||||
// error (or two), we still run type checking (and don't get extra errors there).
|
||||
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z continue-parse-after-error
|
||||
|
||||
// Test that we can recover from missing braces in the parser.
|
||||
|
||||
trait Foo {
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z continue-parse-after-error
|
||||
|
||||
// Test that we can recover from mismatched braces in the parser.
|
||||
|
||||
trait Foo {
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z continue-parse-after-error
|
||||
|
||||
struct Self;
|
||||
//~^ ERROR expected identifier, found keyword `Self`
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
// compile-flags: -Z parse-only -Z continue-parse-after-error
|
||||
|
||||
fn main() {
|
||||
let x = "\x80"; //~ ERROR may only be used
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
// compile-flags: -Z parse-only -Z continue-parse-after-error
|
||||
|
||||
// ignore-tidy-cr
|
||||
// ignore-tidy-tab
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
// compile-flags: -Z parse-only -Z continue-parse-after-error
|
||||
|
||||
|
||||
extern
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
// compile-flags: -Z parse-only -Z continue-parse-after-error
|
||||
|
||||
|
||||
// ignore-tidy-tab
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
// compile-flags: -Z parse-only -Z continue-parse-after-error
|
||||
|
||||
|
||||
// ignore-tidy-tab
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
// compile-flags: -Z parse-only -Z continue-parse-after-error
|
||||
|
||||
|
||||
trait Serializable<'self, T> { //~ ERROR no longer a special lifetime
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only -Z continue-parse-after-error
|
||||
|
||||
fn main() {
|
||||
let _ = b"\u{a66e}";
|
||||
//~^ ERROR unicode escape sequences cannot be used as a byte or in a byte string
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only -Z continue-parse-after-error
|
||||
|
||||
fn main() {
|
||||
0b121; //~ ERROR invalid digit for a base 2 literal
|
||||
0b10_10301; //~ ERROR invalid digit for a base 2 literal
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
// compile-flags: -Z parse-only -Z continue-parse-after-error
|
||||
static c3: char =
|
||||
'\x1' //~ ERROR: numeric character escape is too short
|
||||
;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
// compile-flags: -Z parse-only -Z continue-parse-after-error
|
||||
|
||||
fn main() {
|
||||
0o1.0; //~ ERROR: octal float literal is not supported
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
// compile-flags: -Z parse-only -Z continue-parse-after-error
|
||||
|
||||
// ignore-tidy-cr
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
// compile-flags: -Z parse-only -Z continue-parse-after-error
|
||||
|
||||
pub fn main() {
|
||||
let s = "\u{lol}";
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -Z parse-only
|
||||
// compile-flags: -Z parse-only -Z continue-parse-after-error
|
||||
|
||||
trait A {
|
||||
fn foo(*mut self); //~ ERROR cannot pass self by raw pointer
|
||||
|
|
Loading…
Reference in New Issue