-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
macros: The line number that panic!
reports can be wrong in macro invocations
#40649
Comments
Fixed in #40597. |
frewsxcv
added a commit
to frewsxcv/rust
that referenced
this issue
Mar 26, 2017
…=nrc macros: improve `Span`'s expansion information This PR improves `Span`'s expansion information. More specifically: - It refactors AST node span construction to preserve expansion information. - Today, we only use the underlying tokens' `BytePos`s, throwing away the `ExpnId`s. - This improves the accuracy of AST nodes' expansion information, fixing rust-lang#30506. - It refactors `span.expn_id: ExpnId` to `span.ctxt: SyntaxContext` and removes `ExpnId`. - This gives all tokens as much hygiene information as `Ident`s. - This is groundwork for procedural macros 2.0 `TokenStream` API. - This is also groundwork for declarative macros 2.0, which will need this hygiene information for some non-`Ident` tokens. - It simplifies processing of spans' expansion information throughout the compiler. - It fixes rust-lang#40649. r? @nrc
bors
added a commit
that referenced
this issue
Mar 28, 2017
macros: improve `Span`'s expansion information This PR improves `Span`'s expansion information. More specifically: - It refactors AST node span construction to preserve expansion information. - Today, we only use the underlying tokens' `BytePos`s, throwing away the `ExpnId`s. - This improves the accuracy of AST nodes' expansion information, fixing #30506. - It refactors `span.expn_id: ExpnId` to `span.ctxt: SyntaxContext` and removes `ExpnId`. - This gives all tokens as much hygiene information as `Ident`s. - This is groundwork for procedural macros 2.0 `TokenStream` API. - This is also groundwork for declarative macros 2.0, which will need this hygiene information for some non-`Ident` tokens. - It simplifies processing of spans' expansion information throughout the compiler. - It fixes #40649. r? @nrc
bors
added a commit
that referenced
this issue
Mar 30, 2017
macros: improve `Span`'s expansion information This PR improves `Span`'s expansion information. More specifically: - It refactors AST node span construction to preserve expansion information. - Today, we only use the underlying tokens' `BytePos`s, throwing away the `ExpnId`s. - This improves the accuracy of AST nodes' expansion information, fixing #30506. - It refactors `span.expn_id: ExpnId` to `span.ctxt: SyntaxContext` and removes `ExpnId`. - This gives all tokens as much hygiene information as `Ident`s. - This is groundwork for procedural macros 2.0 `TokenStream` API. - This is also groundwork for declarative macros 2.0, which will need this hygiene information for some non-`Ident` tokens. - It simplifies processing of spans' expansion information throughout the compiler. - It fixes #40649. - It fixes #39450 and fixes part of #23480. r? @nrc
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For example,
The text was updated successfully, but these errors were encountered: