Rollup of 5 pull requests#154047
Open
JonathanBrouwer wants to merge 14 commits intorust-lang:mainfrom
Open
Conversation
`-Zunpretty=expanded,hygiene` was not printing syntax context annotations for identifiers and lifetimes inside `macro_rules!` bodies. These tokens are printed via `print_tt()` → `token_to_string_ext()`, which converts tokens to strings without calling `ann_post()`. This meant that macro-generated `macro_rules!` definitions with hygienic metavar parameters (e.g. multiple `$marg` distinguished only by hygiene) were printed with no way to tell them apart. This was fixed by adding a match on `token.kind` in `print_tt()` to call `ann_post()` for `Ident`, `NtIdent`, `Lifetime`, and `NtLifetime` tokens, matching how `print_ident()` and `print_lifetime()` already handle AST-level identifiers and lifetimes. Signed-off-by: Andrew V. Teylu <andrew.teylu@vector.com>
Add `unpretty-debug-shadow` test covering macro body tokens that reference a shadowed variable, and simplify the `unpretty-debug-metavars` test macro. Signed-off-by: Andrew V. Teylu <andrew.teylu@vector.com>
Co-authored-by: BoxyUwU <rust@boxyuwu.dev>
…elmann Add hygiene annotations for tokens in `macro_rules!` bodies `-Zunpretty=expanded,hygiene` was not printing syntax context annotations for identifiers and lifetimes inside `macro_rules!` bodies. These tokens are printed via `print_tt()` → `token_to_string_ext()`, which converts tokens to strings without calling `ann_post()`. This meant that macro-generated `macro_rules!` definitions with hygienic metavar parameters (e.g. multiple `$marg` distinguished only by hygiene) were printed with no way to tell them apart. This was fixed by adding a match on `token.kind` in `print_tt()` to call `ann_post()` for `Ident`, `NtIdent`, `Lifetime`, and `NtLifetime` tokens, matching how `print_ident()` and `print_lifetime()` already handle AST-level identifiers and lifetimes.
fix inference variables leaking into HIR const literal lowering logic Inference variables could leak into further const lowering logic It ICEs when query system tries to cache `lit_to_const()` after its execution and panics, because inference variables are not hashable for some reason Fixes rust-lang#153524 Fixes rust-lang#153525
Fix some suggestions of the `for-loops-over-fallibles` lint Fix rust-lang#148114 Fix rust-lang#147973 Also address rust-lang/rust-clippy#16133 which is another case of it
mGCA: Lower const generic args to infer when needed close: rust-lang#153198 r? BoxyUwU
… r=jieyouxu,kobzol bootstrap: Optionally print a backtrace if a command fails I found this quite useful for debugging why a command was failing eagerly (it turns out that `.delay_failure()` is ignored if `fail_fast` is enabled).
Contributor
Author
|
@bors r+ rollup=never p=5 |
Contributor
Contributor
Author
|
Trying commonly failed jobs |
This comment has been minimized.
This comment has been minimized.
rust-bors bot
pushed a commit
that referenced
this pull request
Mar 18, 2026
Rollup of 5 pull requests try-job: test-various try-job: x86_64-gnu-aux try-job: x86_64-gnu-llvm-21-3 try-job: x86_64-msvc-1 try-job: aarch64-apple try-job: x86_64-mingw-1
Contributor
|
⌛ Testing commit 7bb7eb6 with merge eaf86bd... Workflow: https://github.com/rust-lang/rust/actions/runs/23260014133 |
rust-bors bot
pushed a commit
that referenced
this pull request
Mar 18, 2026
…uwer Rollup of 5 pull requests Successful merges: - #153308 (Add hygiene annotations for tokens in `macro_rules!` bodies) - #153557 (fix inference variables leaking into HIR const literal lowering logic) - #153913 (Fix some suggestions of the `for-loops-over-fallibles` lint) - #153987 (mGCA: Lower const generic args to infer when needed) - #153992 (bootstrap: Optionally print a backtrace if a command fails)
Contributor
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.
Successful merges:
macro_rules!bodies #153308 (Add hygiene annotations for tokens inmacro_rules!bodies)for-loops-over-fallibleslint #153913 (Fix some suggestions of thefor-loops-over-fallibleslint)r? @ghost
Create a similar rollup