Skip to content

Add regression test for macro matcher dollar suggestion#157198

Open
Kuhai9801 wants to merge 1 commit into
rust-lang:mainfrom
Kuhai9801:add-macro-matcher-dollar-regression
Open

Add regression test for macro matcher dollar suggestion#157198
Kuhai9801 wants to merge 1 commit into
rust-lang:mainfrom
Kuhai9801:add-macro-matcher-dollar-regression

Conversation

@Kuhai9801
Copy link
Copy Markdown

@Kuhai9801 Kuhai9801 commented May 31, 2026

Fixes #157157.

Adds regression coverage for the nested matcher form with an extraneous $ before a macro fragment specifier.

The expected diagnostic points at the extra $ and suggests removing it, producing $e:expr.

Verification:

  • git diff --check
  • rustc +nightly-2026-05-28 --emit=metadata tests\ui\macros\macro-missing-fragment.rs

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels May 31, 2026
@rust-log-analyzer

This comment has been minimized.

@Kuhai9801 Kuhai9801 force-pushed the add-macro-matcher-dollar-regression branch from 7f16066 to 852ce3b Compare May 31, 2026 15:17
@Kuhai9801 Kuhai9801 marked this pull request as ready for review May 31, 2026 17:44
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 31, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 31, 2026

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @petrochenkov (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 (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue
Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 73 candidates
  • Random selection from 17 candidates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extraneous $ in macro by example matcher produces suggestion for nonsensica, syntactically invalid fix

4 participants