Fix wrong source location for some incorrect macro definitions#129154
Merged
bors merged 1 commit intorust-lang:masterfrom Aug 16, 2024
Merged
Fix wrong source location for some incorrect macro definitions#129154bors merged 1 commit intorust-lang:masterfrom
bors merged 1 commit intorust-lang:masterfrom
Conversation
Collaborator
|
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 (
|
estebank
reviewed
Aug 16, 2024
Comment on lines
1
to
+5
| error: missing fragment specifier | ||
| --> $DIR/macro-match-nonterminal.rs:2:8 | ||
| --> $DIR/macro-match-nonterminal.rs:2:6 | ||
| | | ||
| LL | ($a, $b) => { | ||
| | ^ | ||
| | ^^ |
Contributor
There was a problem hiding this comment.
This error deserves more context and a structured suggestion (not in this PR).
Contributor
|
@bors r+ |
Collaborator
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Aug 16, 2024
…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
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Aug 16, 2024
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #95463
Currently the code will consume the next token tree after
varwhen trying to parse$var:some_typeeven 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.