mbe: Simplifications and refactoring by joshtriplett · Pull Request #146802 · 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

Conversation9 Commits3 Checks10 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 }})

@joshtriplett

A few simplifications and refactors in advance of other work.

Macro metavariable expressions were using Ident::as_str and doing string
comparisons; I converted them to use symbols.

I factored out a function for transcribing a ParseNtResult, which will help
separate the evaluation and transcription of future macro metavariable
expressions.

@joshtriplett

Factor out the check for a variable that's still repeating.

@joshtriplett

@joshtriplett

Identify metavariable functions by using named symbols rather than string comparisons.

@rustbot rustbot added 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.

labels

Sep 20, 2025

@rustbot

r? @jackh726

rustbot has assigned @jackh726.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@joshtriplett

hkBst

@hkBst hkBst left a comment • Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joshtriplett

@hkBst I don't think anything in the perf suite is likely to test metavariable expressions.

@joshtriplett

(Also, feel free to review and merge, I don't think this needs to wait for petrochenkov specifically.)

@hkBst

@bors

@hkBst: 🔑 Insufficient privileges: Not in reviewers

@petrochenkov

@bors

📌 Commit a54111a has been approved by petrochenkov

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

and removed S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

labels

Sep 22, 2025

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

Sep 22, 2025

@matthiaskrgr

…r=petrochenkov

mbe: Simplifications and refactoring

A few simplifications and refactors in advance of other work.

Macro metavariable expressions were using Ident::as_str and doing string comparisons; I converted them to use symbols.

I factored out a function for transcribing a ParseNtResult, which will help separate the evaluation and transcription of future macro metavariable expressions.

bors added a commit that referenced this pull request

Sep 22, 2025

@bors

Rollup of 7 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

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

Sep 23, 2025

@Zalathar

…r=petrochenkov

mbe: Simplifications and refactoring

A few simplifications and refactors in advance of other work.

Macro metavariable expressions were using Ident::as_str and doing string comparisons; I converted them to use symbols.

I factored out a function for transcribing a ParseNtResult, which will help separate the evaluation and transcription of future macro metavariable expressions.

bors added a commit that referenced this pull request

Sep 23, 2025

@bors

Rollup of 13 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

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

Sep 23, 2025

@Kobzol

…r=petrochenkov

mbe: Simplifications and refactoring

A few simplifications and refactors in advance of other work.

Macro metavariable expressions were using Ident::as_str and doing string comparisons; I converted them to use symbols.

I factored out a function for transcribing a ParseNtResult, which will help separate the evaluation and transcription of future macro metavariable expressions.

bors added a commit that referenced this pull request

Sep 23, 2025

@bors

Rollup of 8 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

bors added a commit that referenced this pull request

Sep 23, 2025

@bors

Rollup of 10 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

rust-timer added a commit that referenced this pull request

Sep 23, 2025

@rust-timer

Rollup merge of #146802 - joshtriplett:mbe-simplifications, r=petrochenkov

mbe: Simplifications and refactoring

A few simplifications and refactors in advance of other work.

Macro metavariable expressions were using Ident::as_str and doing string comparisons; I converted them to use symbols.

I factored out a function for transcribing a ParseNtResult, which will help separate the evaluation and transcription of future macro metavariable expressions.

Muscraft pushed a commit to Muscraft/rust that referenced this pull request

Sep 24, 2025

@matthiaskrgr @Muscraft

…r=petrochenkov

mbe: Simplifications and refactoring

A few simplifications and refactors in advance of other work.

Macro metavariable expressions were using Ident::as_str and doing string comparisons; I converted them to use symbols.

I factored out a function for transcribing a ParseNtResult, which will help separate the evaluation and transcription of future macro metavariable expressions.

Muscraft pushed a commit to Muscraft/rust that referenced this pull request

Sep 24, 2025

@bors @Muscraft

Labels

S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

T-compiler

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