mbe: Simplifications and refactoring#146802
Merged
bors merged 3 commits intorust-lang:masterfrom Sep 23, 2025
Merged
Conversation
Factor out the check for a variable that's still repeating.
Identify metavariable functions by using named symbols rather than string comparisons.
Collaborator
Member
Author
hkBst
approved these changes
Sep 21, 2025
Member
Author
|
@hkBst I don't think anything in the perf suite is likely to test metavariable expressions. |
Member
Author
|
(Also, feel free to review and merge, I don't think this needs to wait for petrochenkov specifically.) |
Member
|
@joshtriplett I don't think I have any privileges for that :D @bors r+ |
Collaborator
|
@hkBst: 🔑 Insufficient privileges: Not in reviewers |
Contributor
|
@bors r+ rollup |
Collaborator
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Sep 22, 2025
…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
Rollup of 7 pull requests Successful merges: - #146632 (Fix uses of "adaptor") - #146775 (fixes for numerous clippy warnings) - #146802 (mbe: Simplifications and refactoring) - #146806 (add private module override re-export test) - #146866 ([rustdoc] Correctly handle intra doc link when type alias disambiguator is passed for primitive) - #146896 (rustc-dev-guide subtree update) - #146898 (Update books) r? `@ghost` `@rustbot` modify labels: rollup
Zalathar
added a commit
to Zalathar/rust
that referenced
this pull request
Sep 23, 2025
…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
Rollup of 13 pull requests Successful merges: - #146632 (Fix uses of "adaptor") - #146731 (test: Use SVG for terminal url test) - #146775 (fixes for numerous clippy warnings) - #146784 ([win] Use find-msvc-tools instead of cc to find the linker and rc on Windows) - #146799 (Fix a dangling reference in `rustc_thread_pool`) - #146802 (mbe: Simplifications and refactoring) - #146806 (add private module override re-export test) - #146827 (Linker-plugin-based LTO: update list of good combinations (inc. beta + nightly)) - #146875 (tests/run-make/crate-loading: Rename source files for clarity) - #146896 (rustc-dev-guide subtree update) - #146898 (Update books) - #146899 (Fix a crash/mislex when more than one frontmatter closing possibility is considered) - #146907 (add regression test for issue 146537) r? `@ghost` `@rustbot` modify labels: rollup
Kobzol
added a commit
to Kobzol/rust
that referenced
this pull request
Sep 23, 2025
…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
Rollup of 8 pull requests Successful merges: - #146632 (Fix uses of "adaptor") - #146731 (test: Use SVG for terminal url test) - #146775 (fixes for numerous clippy warnings) - #146802 (mbe: Simplifications and refactoring) - #146875 (tests/run-make/crate-loading: Rename source files for clarity) - #146896 (rustc-dev-guide subtree update) - #146898 (Update books) - #146899 (Fix a crash/mislex when more than one frontmatter closing possibility is considered) r? `@ghost` `@rustbot` modify labels: rollup
bors
added a commit
that referenced
this pull request
Sep 23, 2025
Rollup of 10 pull requests Successful merges: - #146632 (Fix uses of "adaptor") - #146731 (test: Use SVG for terminal url test) - #146775 (fixes for numerous clippy warnings) - #146784 ([win] Use find-msvc-tools instead of cc to find the linker and rc on Windows) - #146799 (Fix a dangling reference in `rustc_thread_pool`) - #146802 (mbe: Simplifications and refactoring) - #146806 (add private module override re-export test) - #146827 (Linker-plugin-based LTO: update list of good combinations (inc. beta + nightly)) - #146875 (tests/run-make/crate-loading: Rename source files for clarity) - #146877 (prevent line number from being copied in chrome) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
that referenced
this pull request
Sep 23, 2025
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
…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
…iaskrgr Rollup of 10 pull requests Successful merges: - rust-lang#146632 (Fix uses of "adaptor") - rust-lang#146731 (test: Use SVG for terminal url test) - rust-lang#146775 (fixes for numerous clippy warnings) - rust-lang#146784 ([win] Use find-msvc-tools instead of cc to find the linker and rc on Windows) - rust-lang#146799 (Fix a dangling reference in `rustc_thread_pool`) - rust-lang#146802 (mbe: Simplifications and refactoring) - rust-lang#146806 (add private module override re-export test) - rust-lang#146827 (Linker-plugin-based LTO: update list of good combinations (inc. beta + nightly)) - rust-lang#146875 (tests/run-make/crate-loading: Rename source files for clarity) - rust-lang#146877 (prevent line number from being copied in chrome) r? `@ghost` `@rustbot` modify labels: rollup
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.
A few simplifications and refactors in advance of other work.
Macro metavariable expressions were using
Ident::as_strand doing stringcomparisons; I converted them to use symbols.
I factored out a function for transcribing a
ParseNtResult, which will helpseparate the evaluation and transcription of future macro metavariable
expressions.