Skip to content

Commit 7977250

Browse files
committed
Make sure all ui/parse tests have -Z parse-only
Except those testing parsing during macro expansion
1 parent 64c0efa commit 7977250

File tree

109 files changed

+151
-119
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+151
-119
lines changed

src/test/ui/parser/attr-bad-meta-2.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// compile-flags: -Z parse-only
12+
1113
#[path =] //~ ERROR unexpected token: `]`
1214
mod m {}

src/test/ui/parser/attr-bad-meta-2.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: unexpected token: `]`
2-
--> $DIR/attr-bad-meta-2.rs:11:9
2+
--> $DIR/attr-bad-meta-2.rs:13:9
33
|
44
LL | #[path =] //~ ERROR unexpected token: `]`
55
| ^ unexpected token after this

src/test/ui/parser/attr-bad-meta-3.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// compile-flags: -Z parse-only
12+
1113
#[path() token] //~ ERROR expected `]`, found `token`
1214
mod m {}

src/test/ui/parser/attr-bad-meta-3.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: expected `]`, found `token`
2-
--> $DIR/attr-bad-meta-3.rs:11:10
2+
--> $DIR/attr-bad-meta-3.rs:13:10
33
|
44
LL | #[path() token] //~ ERROR expected `]`, found `token`
55
| ^^^^^ expected `]`

src/test/ui/parser/attr-bad-meta.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// compile-flags: -Z parse-only
12+
1113
#![feature(unrestricted_attribute_tokens)]
1214

1315
#[path*] //~ ERROR expected one of `(`, `::`, `=`, `[`, `]`, or `{`, found `*`

src/test/ui/parser/attr-bad-meta.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: expected one of `(`, `::`, `=`, `[`, `]`, or `{`, found `*`
2-
--> $DIR/attr-bad-meta.rs:13:7
2+
--> $DIR/attr-bad-meta.rs:15:7
33
|
44
LL | #[path*] //~ ERROR expected one of `(`, `::`, `=`, `[`, `]`, or `{`, found `*`
55
| ^ expected one of `(`, `::`, `=`, `[`, `]`, or `{` here

src/test/ui/parser/closure-return-syntax.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
// Test that we cannot parse a closure with an explicit return type
1212
// unless it uses braces.
1313

14+
// compile-flags: -Z parse-only
15+
1416
fn main() {
1517
let x = || -> i32 22;
1618
//~^ ERROR expected one of `!`, `(`, `+`, `::`, `<`, or `{`, found `22`

src/test/ui/parser/closure-return-syntax.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: expected one of `!`, `(`, `+`, `::`, `<`, or `{`, found `22`
2-
--> $DIR/closure-return-syntax.rs:15:23
2+
--> $DIR/closure-return-syntax.rs:17:23
33
|
44
LL | let x = || -> i32 22;
55
| ^^ expected one of `!`, `(`, `+`, `::`, `<`, or `{` here

0 commit comments

Comments
 (0)