Skip to content

Commit

Permalink
tests: add a revision to macro_backtrace without -Zmacro-backtrace.
Browse files Browse the repository at this point in the history
  • Loading branch information
eddyb committed Feb 6, 2020
1 parent 4c7eb59 commit 96af578
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `error`
--> $DIR/main.rs:9:20
--> $DIR/main.rs:10:20
|
LL | / macro_rules! pong {
LL | | () => { syntax error };
Expand All @@ -11,7 +11,7 @@ LL | pong!();
| -------- in this macro invocation

error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `error`
--> $DIR/main.rs:9:20
--> $DIR/main.rs:10:20
|
LL | / macro_rules! pong {
LL | | () => { syntax error };
Expand All @@ -31,7 +31,7 @@ LL | () => { pong ! () ; }
| in this expansion of `ping!`

error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `error`
--> $DIR/main.rs:9:20
--> $DIR/main.rs:10:20
|
LL | / macro_rules! pong {
LL | | () => { syntax error };
Expand Down
35 changes: 35 additions & 0 deletions src/test/ui/macro_backtrace/main.default.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `error`
--> $DIR/main.rs:10:20
|
LL | () => { syntax error };
| ^^^^^ expected one of 8 possible tokens
...
LL | pong!();
| -------- in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `error`
--> $DIR/main.rs:10:20
|
LL | () => { syntax error };
| ^^^^^ expected one of 8 possible tokens
...
LL | ping!();
| -------- in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `error`
--> $DIR/main.rs:10:20
|
LL | () => { syntax error };
| ^^^^^ expected one of 8 possible tokens
...
LL | deep!();
| -------- in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 3 previous errors

3 changes: 2 additions & 1 deletion src/test/ui/macro_backtrace/main.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Test that the macro backtrace facility works
// aux-build:ping.rs
// compile-flags: -Z macro-backtrace
// revisions: default -Zmacro-backtrace
//[-Zmacro-backtrace] compile-flags: -Z macro-backtrace

#[macro_use] extern crate ping;

Expand Down

0 comments on commit 96af578

Please sign in to comment.