tests: add a revision to macro_backtrace without -Zmacro-backtrace.

This commit is contained in:
Eduard-Mihai Burtescu 2020-02-06 12:16:38 +02:00
parent 4c7eb59e81
commit 96af578cd9
3 changed files with 40 additions and 4 deletions

View File

@ -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 };
@ -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 };
@ -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 };

View File

@ -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

View File

@ -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;