Skip to content

Improve DelimArgs pretty-printing #140312

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 2 commits into
base: master
Choose a base branch
from

Conversation

nnethercote
Copy link
Contributor

Add Spacing to DelimArgs to improve pretty-printing. Most notably, this means use statements are printed like use a::{b, c} instead of use a::{ b, c }.

r? @petrochenkov

This improves pretty printing. Most notably, the `FIXME` for suboptimal
printing of `use` groups in `tests/ui/macros/stringify.rs` is fixed.
And all other test output changes result in pretty printed output being
closer to the original formatting in the source code.
@rustbot
Copy link
Collaborator

rustbot commented Apr 25, 2025

Some changes occurred in compiler/rustc_builtin_macros/src/autodiff.rs

cc @ZuseZ4

@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 Apr 25, 2025
@nnethercote
Copy link
Contributor Author

This is a pretty small change to pretty-printing output. In the past we've done crater runs for such changes. We could do one here too, if you think it's worthwhile.

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.

3 participants