Skip to content
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

Move expr- and item-related pretty printing functions to modules #92920

Merged
merged 2 commits into from
Jan 19, 2022

Conversation

dtolnay
Copy link
Member

@dtolnay dtolnay commented Jan 15, 2022

Currently compiler/rustc_ast_pretty/src/pprust/state.rs is 2976 lines on master. The tidy limit is 3000, which is blocking #92243.

This PR adds a mod expr; and mod item; to move logic related to those AST nodes out of the single huge file.

@rust-highfive
Copy link
Collaborator

r? @cjgillot

(rust-highfive has picked a reviewer for you, use r? to override)

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jan 15, 2022
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 15, 2022
@cjgillot
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Jan 15, 2022

📌 Commit 94521b7 has been approved by cjgillot

@bors bors 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 Jan 15, 2022
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 15, 2022
Move expr- and item-related pretty printing functions to modules

Currently *compiler/rustc_ast_pretty/src/pprust/state.rs* is 2976 lines on master. The `tidy` limit is 3000, which is blocking rust-lang#92243.

This PR adds a `mod expr;` and `mod item;` to move logic related to those AST nodes out of the single huge file.
@bors
Copy link
Contributor

bors commented Jan 16, 2022

☔ The latest upstream changes (presumably #92970) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 16, 2022
@dtolnay
Copy link
Member Author

dtolnay commented Jan 16, 2022

@dtolnay
Copy link
Member Author

dtolnay commented Jan 16, 2022

@bors r=cjgillot

@bors
Copy link
Contributor

bors commented Jan 16, 2022

📌 Commit 4556e91d43d019341bf7f3a47822a1a89ebe413c has been approved by cjgillot

@bors bors 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 16, 2022
@bors
Copy link
Contributor

bors commented Jan 17, 2022

☔ The latest upstream changes (presumably #92816) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 17, 2022
@dtolnay
Copy link
Member Author

dtolnay commented Jan 17, 2022

@dtolnay
Copy link
Member Author

dtolnay commented Jan 17, 2022

@bors r=cjgillot

@bors
Copy link
Contributor

bors commented Jan 17, 2022

📌 Commit 6f8e03f22ab71140656c4895874e029a8b9a7361 has been approved by cjgillot

@bors bors 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 17, 2022
@bors
Copy link
Contributor

bors commented Jan 18, 2022

☔ The latest upstream changes (presumably #87648) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 18, 2022
@dtolnay
Copy link
Member Author

dtolnay commented Jan 18, 2022

@dtolnay
Copy link
Member Author

dtolnay commented Jan 18, 2022

@bors r=cjgillot

@bors
Copy link
Contributor

bors commented Jan 18, 2022

📌 Commit 07a0325 has been approved by cjgillot

@bors bors 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 18, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 19, 2022
…askrgr

Rollup of 10 pull requests

Successful merges:

 - rust-lang#88642 (Formally implement let chains)
 - rust-lang#89621 (doc: guarantee call order for sort_by_cached_key)
 - rust-lang#91278 (Use iterator instead of recursion in `codegen_place`)
 - rust-lang#92124 (Little improves in CString `new` when creating from slice)
 - rust-lang#92783 (Annotate dead code lint with notes about ignored derived impls)
 - rust-lang#92797 (Remove horizontal lines at top of page)
 - rust-lang#92920 (Move expr- and item-related pretty printing functions to modules)
 - rust-lang#93041 (Remove some unused ordering derivations based on `DefId`)
 - rust-lang#93051 (Add Option::is_some_with and Result::is_{ok,err}_with)
 - rust-lang#93062 (Update books)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 420ada6 into rust-lang:master Jan 19, 2022
@rustbot rustbot added this to the 1.60.0 milestone Jan 19, 2022
@dtolnay dtolnay deleted the printtidy branch January 19, 2022 18:34
@dtolnay dtolnay added the A-pretty Area: Pretty printing. label Dec 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-pretty Area: Pretty printing. 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.

None yet

5 participants