Skip to content

Rearrange rustc_ast_pretty#155383

Open
nnethercote wants to merge 2 commits intorust-lang:mainfrom
nnethercote:rearrange-rustc_ast_pretty
Open

Rearrange rustc_ast_pretty#155383
nnethercote wants to merge 2 commits intorust-lang:mainfrom
nnethercote:rearrange-rustc_ast_pretty

Conversation

@nnethercote
Copy link
Copy Markdown
Contributor

rustc_ast_pretty has two modules, pp::convenience and helpers, that are small and silly. This PR eliminates them. Details in the individual commits.

r? @WaffleLapkin

For no apparent reason it's in a different file to `Token` itself. This
commit moves it.
`rustc_ast_pretty::pp` defines `Printer` and has a 346 line `impl
Printer` block for it. `rustc_ast_pretty::pp::convenience` has another
`impl Printer` block with 85 lines. `rustc_ast_pretty::helpers` has
another `impl Printer` block with 45 lines.

This commit merges the two small `impl Printer` blocks into the bigger
one, because there is no good reason for them to be separate. Doing this
eliminates the `rustc_ast_pretty::pp::convenience` and
`rustc_ast_pretty::helpers` modules; no great loss given that they were
small and had extremely generic names.
@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 16, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 16, 2026

WaffleLapkin is currently at their maximum review capacity.
They may take a while to respond.

@WaffleLapkin
Copy link
Copy Markdown
Member

@bors r+ rollup

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 16, 2026

📌 Commit 9e940e4 has been approved by WaffleLapkin

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 Apr 16, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Apr 16, 2026
…etty, r=WaffleLapkin

Rearrange `rustc_ast_pretty`

`rustc_ast_pretty` has two modules, `pp::convenience` and `helpers`, that are small and silly. This PR eliminates them. Details in the individual commits.

r? @WaffleLapkin
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Apr 16, 2026
…etty, r=WaffleLapkin

Rearrange `rustc_ast_pretty`

`rustc_ast_pretty` has two modules, `pp::convenience` and `helpers`, that are small and silly. This PR eliminates them. Details in the individual commits.

r? @WaffleLapkin
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Apr 16, 2026
…etty, r=WaffleLapkin

Rearrange `rustc_ast_pretty`

`rustc_ast_pretty` has two modules, `pp::convenience` and `helpers`, that are small and silly. This PR eliminates them. Details in the individual commits.

r? @WaffleLapkin
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants