-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
Fix missing syntax context in lifetime hygiene debug output #151817
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 and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
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
Collaborator
|
rustbot has assigned @jdonszelmann. Use |
This comment has been minimized.
This comment has been minimized.
`-Zunpretty=expanded,hygiene` was not printing the syntax context for lifetimes. For example, two macro-generated lifetimes `'a` with different hygiene would both print as `/* 2538 */` instead of `/* 2538#0 */` and `/* 2538#1 */`, making it impossible to distinguish them. This was fixed by changing `print_lifetime` to call `ann_post()` with the full `Ident`, matching how regular identifiers are handled in `print_ident`.
6bc4b5f to
a333f6f
Compare
Contributor
|
@bors r+ rollup |
Contributor
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Jan 29, 2026
…e, r=jdonszelmann Fix missing syntax context in lifetime hygiene debug output `-Zunpretty=expanded,hygiene` was not printing the syntax context for lifetimes. For example, two macro-generated lifetimes `'a` with different hygiene would both print as `/* 2538 */` instead of `/* 2538#0 */` and `/* 2538#1 */`, making it impossible to distinguish them. This was fixed by changing `print_lifetime` to call `ann_post()` with the full `Ident`, matching how regular identifiers are handled in `print_ident`. Closes: rust-lang#151797
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Jan 29, 2026
…e, r=jdonszelmann Fix missing syntax context in lifetime hygiene debug output `-Zunpretty=expanded,hygiene` was not printing the syntax context for lifetimes. For example, two macro-generated lifetimes `'a` with different hygiene would both print as `/* 2538 */` instead of `/* 2538#0 */` and `/* 2538#1 */`, making it impossible to distinguish them. This was fixed by changing `print_lifetime` to call `ann_post()` with the full `Ident`, matching how regular identifiers are handled in `print_ident`. Closes: rust-lang#151797
rust-bors bot
pushed a commit
that referenced
this pull request
Jan 29, 2026
…uwer Rollup of 4 pull requests Successful merges: - #151808 (Document a safety condition for `TypedArena::alloc_raw_slice`) - #151811 (Fix false positive in unused_parens caused by break) - #151817 (Fix missing syntax context in lifetime hygiene debug output) - #151836 (Fix flakyness issue with `tests/rustdoc-gui/globals.goml` test)
rust-bors bot
pushed a commit
that referenced
this pull request
Jan 30, 2026
…uwer Rollup of 4 pull requests Successful merges: - #151808 (Document a safety condition for `TypedArena::alloc_raw_slice`) - #151811 (Fix false positive in unused_parens caused by break) - #151817 (Fix missing syntax context in lifetime hygiene debug output) - #151836 (Fix flakyness issue with `tests/rustdoc-gui/globals.goml` test)
Zalathar
added a commit
to Zalathar/rust
that referenced
this pull request
Jan 30, 2026
…e, r=jdonszelmann Fix missing syntax context in lifetime hygiene debug output `-Zunpretty=expanded,hygiene` was not printing the syntax context for lifetimes. For example, two macro-generated lifetimes `'a` with different hygiene would both print as `/* 2538 */` instead of `/* 2538#0 */` and `/* 2538#1 */`, making it impossible to distinguish them. This was fixed by changing `print_lifetime` to call `ann_post()` with the full `Ident`, matching how regular identifiers are handled in `print_ident`. Closes: rust-lang#151797
rust-bors bot
pushed a commit
that referenced
this pull request
Jan 30, 2026
Rollup of 6 pull requests Successful merges: - #151777 ( Reduce generics use in the query system.) - #151808 (Document a safety condition for `TypedArena::alloc_raw_slice`) - #151811 (Fix false positive in unused_parens caused by break) - #151817 (Fix missing syntax context in lifetime hygiene debug output) - #151836 (Fix flakyness issue with `tests/rustdoc-gui/globals.goml` test) - #151844 (rustc-dev-guide subtree update)
rust-bors bot
pushed a commit
that referenced
this pull request
Jan 30, 2026
Rollup of 5 pull requests Successful merges: - #151777 ( Reduce generics use in the query system.) - #151808 (Document a safety condition for `TypedArena::alloc_raw_slice`) - #151811 (Fix false positive in unused_parens caused by break) - #151817 (Fix missing syntax context in lifetime hygiene debug output) - #151844 (rustc-dev-guide subtree update)
rust-timer
added a commit
that referenced
this pull request
Jan 30, 2026
Rollup merge of #151817 - aytey:fix_lifetime_unpretty_hygiene, r=jdonszelmann Fix missing syntax context in lifetime hygiene debug output `-Zunpretty=expanded,hygiene` was not printing the syntax context for lifetimes. For example, two macro-generated lifetimes `'a` with different hygiene would both print as `/* 2538 */` instead of `/* 2538#0 */` and `/* 2538#1 */`, making it impossible to distinguish them. This was fixed by changing `print_lifetime` to call `ann_post()` with the full `Ident`, matching how regular identifiers are handled in `print_ident`. Closes: #151797
github-actions bot
pushed a commit
to rust-lang/rustc-dev-guide
that referenced
this pull request
Jan 31, 2026
Rollup of 5 pull requests Successful merges: - rust-lang/rust#151777 ( Reduce generics use in the query system.) - rust-lang/rust#151808 (Document a safety condition for `TypedArena::alloc_raw_slice`) - rust-lang/rust#151811 (Fix false positive in unused_parens caused by break) - rust-lang/rust#151817 (Fix missing syntax context in lifetime hygiene debug output) - rust-lang/rust#151844 (rustc-dev-guide subtree update)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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.
-Zunpretty=expanded,hygienewas not printing the syntax context for lifetimes. For example, two macro-generated lifetimes'awith different hygiene would both print as/* 2538 */instead of/* 2538#0 */and/* 2538#1 */, making it impossible to distinguish them.This was fixed by changing
print_lifetimeto callann_post()with the fullIdent, matching how regular identifiers are handled inprint_ident.Closes: #151797