Skip to content

Rollup of 5 pull requests#154047

Open
JonathanBrouwer wants to merge 14 commits intorust-lang:mainfrom
JonathanBrouwer:rollup-BXQD7Mr
Open

Rollup of 5 pull requests#154047
JonathanBrouwer wants to merge 14 commits intorust-lang:mainfrom
JonathanBrouwer:rollup-BXQD7Mr

Conversation

@JonathanBrouwer
Copy link
Contributor

Successful merges:

r? @ghost

Create a similar rollup

aytey and others added 14 commits March 2, 2026 20:28
`-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).
@rust-bors rust-bors bot added the rollup A PR which is a rollup label Mar 18, 2026
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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 Mar 18, 2026
@JonathanBrouwer
Copy link
Contributor Author

@bors r+ rollup=never p=5

@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 18, 2026

📌 Commit 7bb7eb6 has been approved by JonathanBrouwer

It is now in the queue for this repository.

@rust-bors rust-bors bot 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 Mar 18, 2026
@JonathanBrouwer
Copy link
Contributor Author

Trying commonly failed jobs
@bors try jobs=test-various,x86_64-gnu-aux,x86_64-gnu-llvm-21-3,x86_64-msvc-1,aarch64-apple,x86_64-mingw-1

@rust-bors

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
@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 18, 2026

⌛ 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)
@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 18, 2026

☀️ Try build successful (CI)
Build commit: 93543a3 (93543a330a4c31b29f43a3efda0ecf6cdcbee93e, parent: 53d60bb1c5d325b43419c7618287a1405dec36d0)

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

Labels

rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants