Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use spans for -Z external-macro-backtrace #46605

Merged
merged 2 commits into from
Dec 14, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Move error checks out of span for easier to follow .stderr
  • Loading branch information
estebank committed Dec 13, 2017
commit d4b8e99540ed815f7c0187cf2db8a2e4c0a61d8f
6 changes: 3 additions & 3 deletions src/test/ui/macro_backtrace/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
// a local macro
macro_rules! pong {
() => { syntax error };
//~^ ERROR expected one of
//~| ERROR expected one of
//~| ERROR expected one of
}
//~^^ ERROR expected one of
//~| ERROR expected one of
//~| ERROR expected one of

fn main() {
pong!();
Expand Down
15 changes: 3 additions & 12 deletions src/test/ui/macro_backtrace/main.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found
18 | / macro_rules! pong {
19 | | () => { syntax error };
| | ^^^^^ expected one of 8 possible tokens here
20 | | //~^ ERROR expected one of
21 | | //~| ERROR expected one of
22 | | //~| ERROR expected one of
23 | | }
20 | | }
| |_- in this expansion of `pong!`
...
26 | pong!();
Expand All @@ -19,10 +16,7 @@ error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found
18 | / macro_rules! pong {
19 | | () => { syntax error };
| | ^^^^^ expected one of 8 possible tokens here
20 | | //~^ ERROR expected one of
21 | | //~| ERROR expected one of
22 | | //~| ERROR expected one of
23 | | }
20 | | }
| |_- in this expansion of `pong!`
...
27 | ping!();
Expand All @@ -42,10 +36,7 @@ error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found
18 | / macro_rules! pong {
19 | | () => { syntax error };
| | ^^^^^ expected one of 8 possible tokens here
20 | | //~^ ERROR expected one of
21 | | //~| ERROR expected one of
22 | | //~| ERROR expected one of
23 | | }
20 | | }
| |_- in this expansion of `pong!` (#5)
...
28 | deep!();
Expand Down