mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Relocate macro_backtrace to macro and remove macro_backtrace
This commit is contained in:
@@ -891,12 +891,6 @@ Exercise *Link-Time Optimization* (LTO), involving the flags `-C lto` or `-Z thi
|
||||
|
||||
Tests on changes to inference variable lattice LUB/GLB, see <https://github.com/rust-lang/rust/pull/45853>.
|
||||
|
||||
## `tests/ui/macro_backtrace/`: `-Zmacro-backtrace`
|
||||
|
||||
Contains a single test, checking the unstable command-line flag to enable detailed macro backtraces.
|
||||
|
||||
**FIXME**: This could be merged with `ui/macros`, which already contains other macro backtrace tests.
|
||||
|
||||
## `tests/ui/macros/`
|
||||
|
||||
Broad category of tests on macros.
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
// Test that the macro backtrace facility works (supporting file)
|
||||
// Test that the macro backtrace facility works (supporting macro-backtrace-complex.rs)
|
||||
|
||||
// a non-local macro
|
||||
#[macro_export]
|
||||
macro_rules! ping {
|
||||
() => {
|
||||
pong!();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! deep {
|
||||
() => {
|
||||
foo!();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! foo {
|
||||
() => {
|
||||
bar!();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! bar {
|
||||
() => {
|
||||
ping!();
|
||||
}
|
||||
};
|
||||
}
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `error`
|
||||
--> $DIR/main.rs:10:20
|
||||
--> $DIR/macro-backtrace-complex.rs:12: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:10:20
|
||||
--> $DIR/macro-backtrace-complex.rs:12:20
|
||||
|
|
||||
LL | / macro_rules! pong {
|
||||
LL | | () => { syntax error };
|
||||
@@ -31,7 +31,7 @@ LL | pong!();
|
||||
| ------- in this macro invocation (#2)
|
||||
|
||||
error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `error`
|
||||
--> $DIR/main.rs:10:20
|
||||
--> $DIR/macro-backtrace-complex.rs:12:20
|
||||
|
|
||||
LL | / macro_rules! pong {
|
||||
LL | | () => { syntax error };
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `error`
|
||||
--> $DIR/main.rs:10:20
|
||||
--> $DIR/macro-backtrace-complex.rs:12:20
|
||||
|
|
||||
LL | () => { syntax error };
|
||||
| ^^^^^ expected one of 8 possible tokens
|
||||
@@ -10,7 +10,7 @@ LL | pong!();
|
||||
= note: this error originates in the macro `pong` (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
|
||||
--> $DIR/macro-backtrace-complex.rs:12:20
|
||||
|
|
||||
LL | () => { syntax error };
|
||||
| ^^^^^ expected one of 8 possible tokens
|
||||
@@ -21,7 +21,7 @@ LL | ping!();
|
||||
= note: this error originates in the macro `pong` which comes from the expansion of the macro `ping` (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
|
||||
--> $DIR/macro-backtrace-complex.rs:12:20
|
||||
|
|
||||
LL | () => { syntax error };
|
||||
| ^^^^^ expected one of 8 possible tokens
|
||||
@@ -1,9 +1,11 @@
|
||||
// Test that the macro backtrace facility works
|
||||
// Test the unstable command-line flag (-Z macro-backtrace) to enable detailed macro backtraces
|
||||
// across nested local and external macros.
|
||||
//@ aux-build:ping.rs
|
||||
//@ revisions: default -Zmacro-backtrace
|
||||
//@[-Zmacro-backtrace] compile-flags: -Z macro-backtrace
|
||||
|
||||
#[macro_use] extern crate ping;
|
||||
#[macro_use]
|
||||
extern crate ping;
|
||||
|
||||
// a local macro
|
||||
macro_rules! pong {
|
||||
Reference in New Issue
Block a user