Skip to content

More Printer cleanups #144949

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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

nnethercote
Copy link
Contributor

@nnethercote nnethercote commented Aug 5, 2025

A sequel to #144776.

r? @davidtwco

The use of `print_value_path` means the value namespace is always used
and the `guess_def_namespace` call is unnecessary. This commit removes
the `guess_def_namespace` call and hard-codes `ValueNS`. It also changes
the `print_value_path` to `print_def_path` for consistency with
`def_path_str_with_args`.
Three of them are named `AbsolutePathPrinter`, which is confusing, so
give those names that better indicate how they are used. And then there
is `SymbolPrinter` and `SymbolMangler`, which are renamed as
`LegacySymbolMangler` and `V0SymbolMangler`, better indicating their
similarity.
- `same_path` can just be a `bool`.
- `expected` and `found` are only needed inside the block.
- Neaten a comment.
@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 Aug 5, 2025
@rustbot
Copy link
Collaborator

rustbot commented Aug 5, 2025

Some changes occurred to the CTFE machinery

cc @RalfJung, @oli-obk, @lcnr

@nnethercote nnethercote changed the title More printer cleanups More Printer cleanups Aug 5, 2025
@rust-log-analyzer

This comment has been minimized.

These details took me some time to work out.
I find these name clearer, and starting them all with `print_` makes
things more consistent.
@nnethercote nnethercote force-pushed the more-Printer-cleanups branch from dd90af9 to 42a1042 Compare August 6, 2025 03:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants