tests: Do not use -Z parse-only, continue compilation to test recovery

This commit is contained in:
Vadim Petrochenkov 2019-01-06 18:33:05 +03:00
parent 6b2c311718
commit 1f64f60d5c
530 changed files with 753 additions and 886 deletions

View file

@ -16,8 +16,6 @@ import stat
template = """
// compile-flags: -Z parse-only
// This file was auto-generated using 'src/etc/generate-keyword-tests.py %s'
fn main() {

View file

@ -1543,7 +1543,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
fn visit_item(&mut self, i: &'a ast::Item) {
match i.node {
ast::ItemKind::Static(..) |
ast::ItemKind::Const(_,_) => {
if i.ident.name == "_" {
gate_feature_post!(&self, underscore_const_names, i.span,

View file

@ -1,5 +1,3 @@
// compile-flags: -Z parse-only
fn main () {
((1, (2, 3)).1).1;
}

View file

@ -1,5 +1,3 @@
// compile-flags: -Z parse-only
fn main () {
(1, (2, 3)).1.1;
}

View file

@ -1,5 +1,3 @@
// compile-flags: -Z parse-only
mod mod_file_disambig_aux; //~ ERROR file for module `mod_file_disambig_aux` found at both
fn main() {

View file

@ -1,5 +1,5 @@
error[E0584]: file for module `mod_file_disambig_aux` found at both mod_file_disambig_aux.rs and mod_file_disambig_aux/mod.rs
--> $DIR/mod_file_disambig.rs:3:5
--> $DIR/mod_file_disambig.rs:1:5
|
LL | mod mod_file_disambig_aux; //~ ERROR file for module `mod_file_disambig_aux` found at both
| ^^^^^^^^^^^^^^^^^^^^^

View file

@ -1,5 +1,3 @@
// compile-flags: -Z parse-only
fn main() {
let mut ref x = 10; //~ ERROR the order of `mut` and `ref` is incorrect
let ref mut y = 11;

View file

@ -1,5 +1,5 @@
error: the order of `mut` and `ref` is incorrect
--> $DIR/mut-ref.rs:4:9
--> $DIR/mut-ref.rs:2:9
|
LL | let mut ref x = 10; //~ ERROR the order of `mut` and `ref` is incorrect
| ^^^^^^^ help: try switching the order: `ref mut`

View file

@ -1,4 +1,4 @@
// compile-flags: -Z parse-only -Z continue-parse-after-error
// compile-flags: -Z continue-parse-after-error
fn main() {
let x = "\x80"; //~ ERROR may only be used

View file

@ -1,6 +1,6 @@
// compile-flags: -Z parse-only
fn that_odd_parse() {
fn main() {
// following lines below parse and must not fail
x = if c { a } else { b }();
x = if true { 1 } else { 0 } as *mut _;

View file

@ -1,6 +1,6 @@
// compile-flags: -Z parse-only
fn that_odd_parse() {
fn main() {
// see assoc-oddities-1 for explanation
x..if c { a } else { b }[n]; //~ ERROR expected one of
}

View file

@ -1,4 +1,4 @@
// compile-flags: -Z parse-only -Z continue-parse-after-error
// compile-flags: -Z continue-parse-after-error
// Test you can't use a higher-ranked trait bound inside of a qualified
// path (just won't parse).

View file

@ -1,4 +1,2 @@
// compile-flags: -Z parse-only
#[path =] //~ ERROR unexpected token: `]`
mod m {}

View file

@ -1,5 +1,5 @@
error: unexpected token: `]`
--> $DIR/attr-bad-meta-2.rs:3:9
--> $DIR/attr-bad-meta-2.rs:1:9
|
LL | #[path =] //~ ERROR unexpected token: `]`
| ^ unexpected token after this

View file

@ -1,4 +1,2 @@
// compile-flags: -Z parse-only
#[path() token] //~ ERROR expected `]`, found `token`
mod m {}

View file

@ -1,5 +1,5 @@
error: expected `]`, found `token`
--> $DIR/attr-bad-meta-3.rs:3:10
--> $DIR/attr-bad-meta-3.rs:1:10
|
LL | #[path() token] //~ ERROR expected `]`, found `token`
| ^^^^^ expected `]`

View file

@ -1,5 +1,3 @@
// compile-flags: -Z parse-only
#![feature(unrestricted_attribute_tokens)]
#[path*] //~ ERROR expected one of `(`, `::`, `=`, `[`, `]`, or `{`, found `*`

View file

@ -1,5 +1,5 @@
error: expected one of `(`, `::`, `=`, `[`, `]`, or `{`, found `*`
--> $DIR/attr-bad-meta.rs:5:7
--> $DIR/attr-bad-meta.rs:3:7
|
LL | #[path*] //~ ERROR expected one of `(`, `::`, `=`, `[`, `]`, or `{`, found `*`
| ^ expected one of `(`, `::`, `=`, `[`, `]`, or `{` here

View file

@ -1,3 +1,3 @@
// compile-flags: -Z parse-only
fn main() {}
#[derive(Debug)] //~ERROR expected item after attributes

View file

@ -1,5 +1,3 @@
// compile-flags: -Z parse-only
// error-pattern:expected statement
fn f() {

View file

@ -1,5 +1,5 @@
error: expected statement after outer attribute
--> $DIR/attr-dangling-in-fn.rs:7:1
--> $DIR/attr-dangling-in-fn.rs:5:1
|
LL | }
| ^

View file

@ -1,5 +1,3 @@
// compile-flags: -Z parse-only
// error-pattern:expected item
fn main() {

View file

@ -1,5 +1,5 @@
error: expected item after attributes
--> $DIR/attr-dangling-in-mod.rs:8:14
--> $DIR/attr-dangling-in-mod.rs:6:14
|
LL | #[foo = "bar"]
| ^

View file

@ -1,5 +1,3 @@
// compile-flags: -Z parse-only
#![feature(lang_items)]
fn main() {}

View file

@ -1,5 +1,5 @@
error: an inner attribute is not permitted in this context
--> $DIR/attr.rs:7:3
--> $DIR/attr.rs:5:3
|
LL | #![lang(foo)] //~ ERROR an inner attribute is not permitted in this context
| ^

View file

@ -1,5 +1,3 @@
// compile-flags: -Z parse-only
// Constants (static variables) can be used to match in patterns, but mutable
// statics cannot. This ensures that there's some form of error if this is
// attempted.

View file

@ -1,5 +1,5 @@
error: expected item after attributes
--> $DIR/attrs-after-extern-mod.rs:12:19
--> $DIR/attrs-after-extern-mod.rs:10:19
|
LL | #[cfg(stage37)] //~ ERROR expected item after attributes
| ^

View file

@ -1,4 +1,4 @@
// compile-flags: -Z parse-only -Z continue-parse-after-error
// compile-flags: -Z continue-parse-after-error
// ignore-tidy-cr
// ignore-tidy-tab

View file

@ -1,4 +1,4 @@
// compile-flags: -Z parse-only -Z continue-parse-after-error
// compile-flags: -Z continue-parse-after-error
extern

View file

@ -1,11 +1,4 @@
// compile-flags: -Z parse-only
// error-pattern: expected
fn main() {
let isize x = 5;
let isize x = 5; //~ ERROR expected one of `:`, `;`, `=`, or `@`, found `x`
match x;
}
fn main() {
}

View file

@ -1,7 +1,7 @@
error: expected one of `:`, `;`, `=`, or `@`, found `x`
--> $DIR/bad-match.rs:6:13
--> $DIR/bad-match.rs:2:13
|
LL | let isize x = 5;
LL | let isize x = 5; //~ ERROR expected one of `:`, `;`, `=`, or `@`, found `x`
| ^ expected one of `:`, `;`, `=`, or `@` here
error: aborting due to previous error

View file

@ -1,5 +1,3 @@
// compile-flags: -Z parse-only
// error-pattern: expected
fn main() {

View file

@ -1,5 +1,5 @@
error: expected one of `:`, `;`, `=`, or `@`, found `.`
--> $DIR/bad-name.rs:6:8
--> $DIR/bad-name.rs:4:8
|
LL | let x.y::<isize>.z foo;
| ^ expected one of `:`, `;`, `=`, or `@` here

View file

@ -1,5 +1,5 @@
// compile-flags: -Z parse-only
fn foo(_: *()) {
//~^ expected mut or const in raw pointer type (use `*mut T` or `*const T` as appropriate)
}
fn main() {}

View file

@ -1,5 +1,5 @@
error: expected mut or const in raw pointer type (use `*mut T` or `*const T` as appropriate)
--> $DIR/bad-pointer-type.rs:3:11
--> $DIR/bad-pointer-type.rs:1:11
|
LL | fn foo(_: *()) {
| ^

View file

@ -1,4 +1,2 @@
// compile-flags: -Z parse-only
fn false() { } //~ ERROR expected identifier, found keyword `false`
fn main() { }

View file

@ -1,5 +1,5 @@
error: expected identifier, found keyword `false`
--> $DIR/bad-value-ident-false.rs:3:4
--> $DIR/bad-value-ident-false.rs:1:4
|
LL | fn false() { } //~ ERROR expected identifier, found keyword `false`
| ^^^^^ expected identifier, found keyword

View file

@ -1,4 +1,2 @@
// compile-flags: -Z parse-only
fn true() { } //~ ERROR expected identifier, found keyword `true`
fn main() { }

View file

@ -1,5 +1,5 @@
error: expected identifier, found keyword `true`
--> $DIR/bad-value-ident-true.rs:3:4
--> $DIR/bad-value-ident-true.rs:1:4
|
LL | fn true() { } //~ ERROR expected identifier, found keyword `true`
| ^^^^ expected identifier, found keyword

View file

@ -1,5 +1,3 @@
// compile-flags: -Z parse-only
fn main() {
let x: [isize 3]; //~ ERROR expected one of `!`, `(`, `+`, `::`, `;`, `<`, or `]`, found `3`
}

View file

@ -1,5 +1,5 @@
error: expected one of `!`, `(`, `+`, `::`, `;`, `<`, or `]`, found `3`
--> $DIR/better-expected.rs:4:19
--> $DIR/better-expected.rs:2:19
|
LL | let x: [isize 3]; //~ ERROR expected one of `!`, `(`, `+`, `::`, `;`, `<`, or `]`, found `3`
| - ^ expected one of 7 possible tokens here

View file

@ -1,9 +1,8 @@
// compile-flags: -Z parse-only
fn main() {
struct Foo { x: isize }
match (Foo { x: 10 }) {
Foo { ref x: ref x } => {}, //~ ERROR expected `,`
//~| ERROR pattern does not mention field `x`
_ => {}
}
}

View file

@ -1,8 +1,15 @@
error: expected `,`
--> $DIR/bind-struct-early-modifiers.rs:6:19
--> $DIR/bind-struct-early-modifiers.rs:4:19
|
LL | Foo { ref x: ref x } => {}, //~ ERROR expected `,`
| ^
error: aborting due to previous error
error[E0027]: pattern does not mention field `x`
--> $DIR/bind-struct-early-modifiers.rs:4:9
|
LL | Foo { ref x: ref x } => {}, //~ ERROR expected `,`
| ^^^^^^^^^^^^^^^^^^^^ missing field `x`
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0027`.

View file

@ -1,3 +1 @@
// compile-flags: -Z parse-only
fn f<T: ?>() {} //~ ERROR expected identifier, found `>`

View file

@ -1,5 +1,5 @@
error: expected identifier, found `>`
--> $DIR/bound-single-question-mark.rs:3:10
--> $DIR/bound-single-question-mark.rs:1:10
|
LL | fn f<T: ?>() {} //~ ERROR expected identifier, found `>`
| ^ expected identifier

View file

@ -1,5 +1,3 @@
// compile-flags: -Z parse-only
type A = for<'a 'b> fn(); //~ ERROR expected one of `,`, `:`, or `>`, found `'b`
fn main() {}

View file

@ -1,5 +1,5 @@
error: expected one of `,`, `:`, or `>`, found `'b`
--> $DIR/bounds-lifetime-1.rs:3:17
--> $DIR/bounds-lifetime-1.rs:1:17
|
LL | type A = for<'a 'b> fn(); //~ ERROR expected one of `,`, `:`, or `>`, found `'b`
| ^^ expected one of `,`, `:`, or `>` here

View file

@ -1,5 +1,3 @@
// compile-flags: -Z parse-only
type A = for<'a + 'b> fn(); //~ ERROR expected one of `,`, `:`, or `>`, found `+`
fn main() {}

View file

@ -1,5 +1,5 @@
error: expected one of `,`, `:`, or `>`, found `+`
--> $DIR/bounds-lifetime-2.rs:3:17
--> $DIR/bounds-lifetime-2.rs:1:17
|
LL | type A = for<'a + 'b> fn(); //~ ERROR expected one of `,`, `:`, or `>`, found `+`
| ^ expected one of `,`, `:`, or `>` here

View file

@ -1,5 +1,3 @@
// compile-flags: -Z parse-only
type A where 'a; //~ ERROR expected `:`, found `;`
fn main() {}

View file

@ -1,5 +1,5 @@
error: expected `:`, found `;`
--> $DIR/bounds-lifetime-where-1.rs:3:16
--> $DIR/bounds-lifetime-where-1.rs:1:16
|
LL | type A where 'a; //~ ERROR expected `:`, found `;`
| ^ expected `:`

View file

@ -1,5 +1,3 @@
// compile-flags: -Z parse-only
type A where 'a: 'b + 'c = u8; // OK
type A where 'a: 'b, = u8; // OK
type A where 'a: = u8; // OK

View file

@ -1,5 +1,5 @@
error: expected one of `=`, lifetime, or type, found `,`
--> $DIR/bounds-lifetime-where.rs:10:14
--> $DIR/bounds-lifetime-where.rs:8:14
|
LL | type A where , = u8; //~ ERROR expected one of `=`, lifetime, or type, found `,`
| ^ expected one of `=`, lifetime, or type here

View file

@ -1,5 +1,3 @@
// compile-flags: -Z parse-only
type A = for<'a:> fn(); // OK
type A = for<'a:,> fn(); // OK
type A = for<'a> fn(); // OK

View file

@ -1,5 +1,5 @@
error: expected one of `>`, identifier, or lifetime, found `,`
--> $DIR/bounds-lifetime.rs:11:14
--> $DIR/bounds-lifetime.rs:9:14
|
LL | type A = for<,> fn(); //~ ERROR expected one of `>`, identifier, or lifetime, found `,`
| ^ expected one of `>`, identifier, or lifetime here

View file

@ -1,4 +1,5 @@
// compile-pass
// compile-flags: -Z parse-only
type A = Box<(Fn(D::Error) -> E) + 'static + Send + Sync>; // OK (but see #39318)
type A = Box<(Fn(u8) -> u8) + 'static + Send + Sync>; // OK (but see #39318)
fn main() {}

View file

@ -1,5 +1,3 @@
// compile-flags: -Z parse-only
type A where for<'a> for<'b> Trait1 + ?Trait2: 'a + Trait = u8; // OK
type A where T: Trait, = u8; // OK
type A where T: = u8; // OK

View file

@ -1,5 +1,5 @@
error: expected one of `!`, `(`, `+`, `::`, `:`, `<`, `==`, or `=`, found `,`
--> $DIR/bounds-type-where.rs:10:15
--> $DIR/bounds-type-where.rs:8:15
|
LL | type A where T, = u8;
| ^ expected one of 8 possible tokens here

View file

@ -1,7 +1,5 @@
// compile-flags: -Z parse-only
fn foo() {
match x {
fn main() {
match 10 {
<T as Trait>::Type{key: value} => (),
//~^ ERROR unexpected `{` after qualified path
_ => (),

View file

@ -1,5 +1,5 @@
error: unexpected `{` after qualified path
--> $DIR/brace-after-qualified-path-in-match.rs:5:27
--> $DIR/brace-after-qualified-path-in-match.rs:3:27
|
LL | <T as Trait>::Type{key: value} => (),
| ^ unexpected `{` after qualified path

View file

@ -1,4 +1,4 @@
// compile-flags: -Z parse-only -Z continue-parse-after-error
// compile-flags: -Z continue-parse-after-error
// ignore-tidy-tab

View file

@ -1,4 +1,4 @@
// compile-flags: -Z parse-only -Z continue-parse-after-error
// compile-flags: -Z continue-parse-after-error
// ignore-tidy-tab

View file

@ -1,5 +1,3 @@
// compile-flags: -Z parse-only
// ignore-test: this is an auxiliary file for circular-modules-main.rs
#[path = "circular_modules_main.rs"]

View file

@ -1,5 +1,3 @@
// compile-flags: -Z parse-only
#[path = "circular_modules_hello.rs"]
mod circular_modules_hello; //~ ERROR: circular modules

View file

@ -1,5 +1,5 @@
error: circular modules: $DIR/circular_modules_hello.rs -> $DIR/circular_modules_main.rs -> $DIR/circular_modules_hello.rs
--> $DIR/circular_modules_main.rs:4:5
--> $DIR/circular_modules_main.rs:2:5
|
LL | mod circular_modules_hello; //~ ERROR: circular modules
| ^^^^^^^^^^^^^^^^^^^^^^

View file

@ -1,5 +1,3 @@
// compile-flags: -Z parse-only
// error-pattern:nonexistent
class cat : nonexistent {
let meows: usize;

View file

@ -1,5 +1,5 @@
error: expected one of `!` or `::`, found `cat`
--> $DIR/class-implements-bad-trait.rs:4:7
--> $DIR/class-implements-bad-trait.rs:2:7
|
LL | class cat : nonexistent {
| ^^^ expected one of `!` or `::` here

View file

@ -1,8 +1,6 @@
// Test that we cannot parse a closure with an explicit return type
// unless it uses braces.
// compile-flags: -Z parse-only
fn main() {
let x = || -> i32 22;
//~^ ERROR expected one of `!`, `(`, `+`, `::`, `<`, or `{`, found `22`

View file

@ -1,5 +1,5 @@
error: expected one of `!`, `(`, `+`, `::`, `<`, or `{`, found `22`
--> $DIR/closure-return-syntax.rs:7:23
--> $DIR/closure-return-syntax.rs:5:23
|
LL | let x = || -> i32 22;
| ^^ expected one of `!`, `(`, `+`, `::`, `<`, or `{` here

View file

@ -1,3 +1 @@
// compile-flags: -Z parse-only
# //~ ERROR expected `[`, found `<eof>`

View file

@ -1,5 +1,5 @@
error: expected `[`, found `<eof>`
--> $DIR/column-offset-1-based.rs:3:1
--> $DIR/column-offset-1-based.rs:1:1
|
LL | # //~ ERROR expected `[`, found `<eof>`
| ^ expected `[`

View file

@ -1,7 +1,7 @@
// compile-flags: -Z parse-only
// Test successful and unsuccessful parsing of the `default` contextual keyword
#![feature(specialization)]
trait Foo {
fn foo<T: Default>() -> T;
}
@ -13,12 +13,12 @@ impl Foo for u8 {
}
impl Foo for u16 {
pub default fn foo<T: Default>() -> T {
pub default fn foo<T: Default>() -> T { //~ ERROR unnecessary visibility qualifier
T::default()
}
}
impl Foo for u32 {
impl Foo for u32 { //~ ERROR not all trait items implemented, missing: `foo`
default pub fn foo<T: Default>() -> T { T::default() } //~ ERROR expected one of
}

View file

@ -4,5 +4,22 @@ error: expected one of `async`, `const`, `existential`, `extern`, `fn`, `type`,
LL | default pub fn foo<T: Default>() -> T { T::default() } //~ ERROR expected one of
| ^^^ expected one of 7 possible tokens here
error: aborting due to previous error
error[E0449]: unnecessary visibility qualifier
--> $DIR/default.rs:16:5
|
LL | pub default fn foo<T: Default>() -> T { //~ ERROR unnecessary visibility qualifier
| ^^^ `pub` not permitted here because it's implied
error[E0046]: not all trait items implemented, missing: `foo`
--> $DIR/default.rs:21:1
|
LL | fn foo<T: Default>() -> T;
| -------------------------- `foo` from trait
...
LL | impl Foo for u32 { //~ ERROR not all trait items implemented, missing: `foo`
| ^^^^^^^^^^^^^^^^ missing `foo` in implementation
error: aborting due to 3 previous errors
Some errors occurred: E0046, E0449.
For more information about an error, try `rustc --explain E0046`.

View file

@ -1,5 +1,3 @@
// compile-flags: -Z parse-only
fn main() {
let _: Option<()> = do catch {};
//~^ ERROR found removed `do catch` syntax

View file

@ -1,5 +1,5 @@
error: found removed `do catch` syntax
--> $DIR/do-catch-suggests-try.rs:4:25
--> $DIR/do-catch-suggests-try.rs:2:25
|
LL | let _: Option<()> = do catch {};
| ^^

View file

@ -1,4 +1,4 @@
// compile-flags: -Z parse-only -Z continue-parse-after-error
// compile-flags: -Z continue-parse-after-error
struct X {
a: u8 /** document a */,

View file

@ -1,4 +1,4 @@
// compile-flags: -Z parse-only
fn main() {}
/// hi
#[derive(Debug)] //~ERROR expected item after attributes

View file

@ -1,3 +1,3 @@
// compile-flags: -Z parse-only
fn main() {}
/// hi //~ERROR expected item after doc comment

View file

@ -1,5 +1,3 @@
// compile-flags: -Z parse-only
extern {
/// hi
//~^ ERROR expected item after doc comment

View file

@ -1,5 +1,5 @@
error: expected item after doc comment
--> $DIR/doc-before-extern-rbrace.rs:4:5
--> $DIR/doc-before-extern-rbrace.rs:2:5
|
LL | /// hi
| ^^^^^^

View file

@ -1,4 +1,4 @@
// compile-flags: -Z parse-only -Z continue-parse-after-error
// compile-flags: -Z continue-parse-after-error
fn main() {
/// document

View file

@ -1,4 +1,4 @@
// compile-flags: -Z parse-only -Z continue-parse-after-error
// compile-flags: -Z continue-parse-after-error
fn /// document
foo() {}

View file

@ -1,6 +1,8 @@
// compile-flags: -Z parse-only -Z continue-parse-after-error
// compile-flags: -Z continue-parse-after-error
mod Foo {
/// document
//~^ ERROR expected item after doc comment
}
fn main() {}

View file

@ -1,5 +1,3 @@
// compile-flags: -Z parse-only
fn main() {
println!("Hi"); /// hi
//~^ ERROR found a documentation comment that doesn't document anything

View file

@ -1,5 +1,5 @@
error[E0585]: found a documentation comment that doesn't document anything
--> $DIR/doc-before-rbrace.rs:4:21
--> $DIR/doc-before-rbrace.rs:2:21
|
LL | println!("Hi"); /// hi
| ^^^^^^

View file

@ -1,5 +1,3 @@
// compile-flags: -Z parse-only
fn main() {
/// hi
//~^ ERROR found a documentation comment that doesn't document anything

View file

@ -1,5 +1,5 @@
error[E0585]: found a documentation comment that doesn't document anything
--> $DIR/doc-before-semi.rs:4:5
--> $DIR/doc-before-semi.rs:2:5
|
LL | /// hi
| ^^^^^^

View file

@ -1,4 +1,4 @@
// compile-flags: -Z parse-only -Z continue-parse-after-error
// compile-flags: -Z continue-parse-after-error
struct X {
a: u8,

View file

@ -1,4 +1,4 @@
// compile-flags: -Z parse-only -Z continue-parse-after-error
// compile-flags: -Z continue-parse-after-error
struct X {
a: u8 /// document

View file

@ -1,5 +1,3 @@
// compile-flags: -Z parse-only
// error-pattern:expected one of `(`, `fn`, `static`, or `type`
extern {
pub pub fn foo();

View file

@ -1,5 +1,5 @@
error: expected one of `(`, `fn`, `static`, or `type`, found `pub`
--> $DIR/duplicate-visibility.rs:5:9
--> $DIR/duplicate-visibility.rs:3:9
|
LL | pub pub fn foo();
| ^^^ expected one of `(`, `fn`, `static`, or `type` here

View file

@ -1,3 +1 @@
// compile-flags: -Z parse-only
impl Foo; //~ ERROR expected one of `!`, `(`, `+`, `::`, `<`, `for`, `where`, or `{`, found `;`

View file

@ -1,5 +1,5 @@
error: expected one of `!`, `(`, `+`, `::`, `<`, `for`, `where`, or `{`, found `;`
--> $DIR/empty-impl-semicolon.rs:3:9
--> $DIR/empty-impl-semicolon.rs:1:9
|
LL | impl Foo; //~ ERROR expected one of `!`, `(`, `+`, `::`, `<`, `for`, `where`, or `{`, found `;`
| ^ expected one of 8 possible tokens here

View file

@ -1,3 +1 @@
// compile-flags: -Z parse-only
extern crte foo; //~ ERROR expected one of `crate`, `fn`, or `{`, found `crte`

View file

@ -1,5 +1,5 @@
error: expected one of `crate`, `fn`, or `{`, found `crte`
--> $DIR/extern-crate-unexpected-token.rs:3:8
--> $DIR/extern-crate-unexpected-token.rs:1:8
|
LL | extern crte foo; //~ ERROR expected one of `crate`, `fn`, or `{`, found `crte`
| ^^^^ expected one of `crate`, `fn`, or `{` here

View file

@ -1,5 +1,3 @@
// compile-flags: -Z parse-only
// Verifies that the expected token errors for `extern crate` are
// raised

View file

@ -1,5 +1,5 @@
error: expected one of `fn` or `{`, found `mod`
--> $DIR/extern-expected-fn-or-brace.rs:6:12
--> $DIR/extern-expected-fn-or-brace.rs:4:12
|
LL | extern "C" mod foo; //~ERROR expected one of `fn` or `{`, found `mod`
| ^^^ expected one of `fn` or `{` here

View file

@ -1,5 +1,3 @@
// compile-flags: -Z parse-only
// Verifies that the expected token errors for `extern crate` are
// raised

View file

@ -1,5 +1,5 @@
error: expected one of `;` or `as`, found `{`
--> $DIR/extern-foreign-crate.rs:6:18
--> $DIR/extern-foreign-crate.rs:4:18
|
LL | extern crate foo {} //~ERROR expected one of `;` or `as`, found `{`
| ^ expected one of `;` or `as` here

View file

@ -1,5 +1,3 @@
// compile-flags: -Z parse-only
extern { //~ ERROR missing `fn`, `type`, or `static` for extern-item declaration
f();
}

Some files were not shown because too many files have changed in this diff Show more