mbe: Rework the concat metavariable expression by tgross35 · Pull Request #142975 · rust-lang/rust (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation5 Commits5 Checks11 Files changed

Conversation

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

[ Show hidden characters]({{ revealButtonHref }})

@tgross35

@rustbot rustbot added A-tidy

Area: The tidy tool

T-bootstrap

Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

T-compiler

Relevant to the compiler team, which will review and decide on the PR/issue.

labels

Jun 24, 2025

@rust-log-analyzer

This comment has been minimized.

This was referenced

Jun 24, 2025

@petrochenkov petrochenkov added the S-blocked

Status: Blocked on something else such as an RFC or other implementation work.

label

Jun 30, 2025

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request

Jul 1, 2025

@matthiaskrgr

…ation, r=petrochenkov

mbe: Add tests and restructure metavariable expressions

Add tests that show better diagnostics, and factor concat handling to a separate function. Each commit message has further details.

This performs the nonfunctional perparation for further changes such as rust-lang#142950 and rust-lang#142975 .

rust-timer added a commit that referenced this pull request

Jul 1, 2025

@rust-timer

Rollup merge of #143245 - tgross35:metavariable-expr-organization, r=petrochenkov

mbe: Add tests and restructure metavariable expressions

Add tests that show better diagnostics, and factor concat handling to a separate function. Each commit message has further details.

This performs the nonfunctional perparation for further changes such as #142950 and #142975 .

@bors

@tgross35

Give a more user-friendly diagnostic about the following:

@tgross35

Change to a structural diagnostic, update the valid list, and move the valid list to a note.

@tgross35

The current messages have the potential to be more accurate; "expected identifier or string literal" is printed in a few cases where only an identifier should be expected, and it suggests removing string literals when that might not solve the problem. Add a new diagnostic for these kind of errors that gives more context and a better description.

For count and ignore this should likely be combined with the diagnositcs for eat_dollar to produce a helpful error if they get anything other than a metavariable first argument. I am planning to do this in a followup.

@tgross35

@tgross35

@bors

@petrochenkov

@rustbot rustbot removed the S-blocked

Status: Blocked on something else such as an RFC or other implementation work.

label

Jul 14, 2025

@rustbot

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@rustbot rustbot added the S-waiting-on-author

Status: This is awaiting some action (such as code changes or more information) from the author.

label

Jul 14, 2025

Labels

A-tidy

Area: The tidy tool

rla-silenced

Silences rust-log-analyzer postings to the PR it's added on.

S-waiting-on-author

Status: This is awaiting some action (such as code changes or more information) from the author.

T-bootstrap

Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

T-compiler

Relevant to the compiler team, which will review and decide on the PR/issue.