Skip to content

Commit bfc0c02

Browse files
committed
Relocate macro_backtrace to macro and remove macro_backtrace
1 parent e6edf3a commit bfc0c02

File tree

5 files changed

+15
-19
lines changed

5 files changed

+15
-19
lines changed

tests/ui/README.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -891,12 +891,6 @@ Exercise *Link-Time Optimization* (LTO), involving the flags `-C lto` or `-Z thi
891891

892892
Tests on changes to inference variable lattice LUB/GLB, see <https://github.com/rust-lang/rust/pull/45853>.
893893

894-
## `tests/ui/macro_backtrace/`: `-Zmacro-backtrace`
895-
896-
Contains a single test, checking the unstable command-line flag to enable detailed macro backtraces.
897-
898-
**FIXME**: This could be merged with `ui/macros`, which already contains other macro backtrace tests.
899-
900894
## `tests/ui/macros/`
901895

902896
Broad category of tests on macros.
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
1-
// Test that the macro backtrace facility works (supporting file)
1+
// Test that the macro backtrace facility works (supporting macro-backtrace-complex.rs)
22

33
// a non-local macro
44
#[macro_export]
55
macro_rules! ping {
66
() => {
77
pong!();
8-
}
8+
};
99
}
1010

1111
#[macro_export]
1212
macro_rules! deep {
1313
() => {
1414
foo!();
15-
}
15+
};
1616
}
1717

1818
#[macro_export]
1919
macro_rules! foo {
2020
() => {
2121
bar!();
22-
}
22+
};
2323
}
2424

2525
#[macro_export]
2626
macro_rules! bar {
2727
() => {
2828
ping!();
29-
}
29+
};
3030
}

tests/ui/macro_backtrace/main.-Zmacro-backtrace.stderr renamed to tests/ui/macros/macro-backtrace-complex.-Zmacro-backtrace.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `error`
2-
--> $DIR/main.rs:10:20
2+
--> $DIR/macro-backtrace-complex.rs:12:20
33
|
44
LL | / macro_rules! pong {
55
LL | | () => { syntax error };
@@ -11,7 +11,7 @@ LL | pong!();
1111
| ------- in this macro invocation
1212

1313
error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `error`
14-
--> $DIR/main.rs:10:20
14+
--> $DIR/macro-backtrace-complex.rs:12:20
1515
|
1616
LL | / macro_rules! pong {
1717
LL | | () => { syntax error };
@@ -31,7 +31,7 @@ LL | pong!();
3131
| ------- in this macro invocation (#2)
3232

3333
error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `error`
34-
--> $DIR/main.rs:10:20
34+
--> $DIR/macro-backtrace-complex.rs:12:20
3535
|
3636
LL | / macro_rules! pong {
3737
LL | | () => { syntax error };

tests/ui/macro_backtrace/main.default.stderr renamed to tests/ui/macros/macro-backtrace-complex.default.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `error`
2-
--> $DIR/main.rs:10:20
2+
--> $DIR/macro-backtrace-complex.rs:12:20
33
|
44
LL | () => { syntax error };
55
| ^^^^^ expected one of 8 possible tokens
@@ -10,7 +10,7 @@ LL | pong!();
1010
= note: this error originates in the macro `pong` (in Nightly builds, run with -Z macro-backtrace for more info)
1111

1212
error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `error`
13-
--> $DIR/main.rs:10:20
13+
--> $DIR/macro-backtrace-complex.rs:12:20
1414
|
1515
LL | () => { syntax error };
1616
| ^^^^^ expected one of 8 possible tokens
@@ -21,7 +21,7 @@ LL | ping!();
2121
= 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)
2222

2323
error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `error`
24-
--> $DIR/main.rs:10:20
24+
--> $DIR/macro-backtrace-complex.rs:12:20
2525
|
2626
LL | () => { syntax error };
2727
| ^^^^^ expected one of 8 possible tokens

tests/ui/macro_backtrace/main.rs renamed to tests/ui/macros/macro-backtrace-complex.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
// Test that the macro backtrace facility works
1+
// Test the unstable command-line flag (-Z macro-backtrace) to enable detailed macro backtraces
2+
// across nested local and external macros.
23
//@ aux-build:ping.rs
34
//@ revisions: default -Zmacro-backtrace
45
//@[-Zmacro-backtrace] compile-flags: -Z macro-backtrace
56

6-
#[macro_use] extern crate ping;
7+
#[macro_use]
8+
extern crate ping;
79

810
// a local macro
911
macro_rules! pong {

0 commit comments

Comments
 (0)