Skip to content

Commit d4b8e99

Browse files
committed
Move error checks out of span for easier to follow .stderr
1 parent b7bb67a commit d4b8e99

File tree

2 files changed

+6
-15
lines changed

2 files changed

+6
-15
lines changed

src/test/ui/macro_backtrace/main.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
// a local macro
1818
macro_rules! pong {
1919
() => { syntax error };
20-
//~^ ERROR expected one of
21-
//~| ERROR expected one of
22-
//~| ERROR expected one of
2320
}
21+
//~^^ ERROR expected one of
22+
//~| ERROR expected one of
23+
//~| ERROR expected one of
2424

2525
fn main() {
2626
pong!();

src/test/ui/macro_backtrace/main.stderr

+3-12
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@ error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found
44
18 | / macro_rules! pong {
55
19 | | () => { syntax error };
66
| | ^^^^^ expected one of 8 possible tokens here
7-
20 | | //~^ ERROR expected one of
8-
21 | | //~| ERROR expected one of
9-
22 | | //~| ERROR expected one of
10-
23 | | }
7+
20 | | }
118
| |_- in this expansion of `pong!`
129
...
1310
26 | pong!();
@@ -19,10 +16,7 @@ error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found
1916
18 | / macro_rules! pong {
2017
19 | | () => { syntax error };
2118
| | ^^^^^ expected one of 8 possible tokens here
22-
20 | | //~^ ERROR expected one of
23-
21 | | //~| ERROR expected one of
24-
22 | | //~| ERROR expected one of
25-
23 | | }
19+
20 | | }
2620
| |_- in this expansion of `pong!`
2721
...
2822
27 | ping!();
@@ -42,10 +36,7 @@ error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found
4236
18 | / macro_rules! pong {
4337
19 | | () => { syntax error };
4438
| | ^^^^^ expected one of 8 possible tokens here
45-
20 | | //~^ ERROR expected one of
46-
21 | | //~| ERROR expected one of
47-
22 | | //~| ERROR expected one of
48-
23 | | }
39+
20 | | }
4940
| |_- in this expansion of `pong!` (#5)
5041
...
5142
28 | deep!();

0 commit comments

Comments
 (0)