-
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
Fix wrong source location for some incorrect macro definitions #129154
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @pnkfelix (or someone else) some time within the next two weeks. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
error: missing fragment specifier | ||
--> $DIR/macro-match-nonterminal.rs:2:8 | ||
--> $DIR/macro-match-nonterminal.rs:2:6 | ||
| | ||
LL | ($a, $b) => { | ||
| ^ | ||
| ^^ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This error deserves more context and a structured suggestion (not in this PR).
@bors r+ |
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#128990 (Re-enable more debuginfo tests on freebsd) - rust-lang#129042 (Special-case alias ty during the delayed bug emission in `try_from_lit`) - rust-lang#129086 (Stabilize `is_none_or`) - rust-lang#129149 (Migrate `validate_json.py` script to rust in `run-make/rustdoc-map-file` test) - rust-lang#129154 (Fix wrong source location for some incorrect macro definitions) - rust-lang#129161 (Stabilize std::thread::Builder::spawn_unchecked) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#129154 - wafarm:fix-95463, r=estebank Fix wrong source location for some incorrect macro definitions Fixes rust-lang#95463 Currently the code will consume the next token tree after `var` when trying to parse `$var:some_type` even when it's not a `:` (e.g. a `$` when input is `($foo $bar:tt) => {}`). Additionally it will return the wrong span when it's not a `:`. This PR fixes these problems.
Fixes #95463
Currently the code will consume the next token tree after
var
when trying to parse$var:some_type
even when it's not a:
(e.g. a$
when input is($foo $bar:tt) => {}
). Additionally it will return the wrong span when it's not a:
.This PR fixes these problems.