-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Fix some pretty printing tests #37202
Conversation
@nrc |
It's been on my mind, but I don't have a plan. ATM, I think we leave it in place and maintain it to the minimal state necessary. If it becomes a burden, we might look to sharing code between Rustfmt and the pretty printer. I don't know exactly how this would work. This would probably be easier with Rustbuild and using an external crate.
Agree. I think it is sometimes useful to have pretty printing of whole programs for debugging, and that requires keeping the formatting stuff. We could probably lose comments, but it doesn't seem like a burden.
I'm not sure off the top of my head whether we use HIR pretty printer for error messages, etc. But it seems likely we do for types, etc. Again, it is sometimes useful for debugging to dump HIR as code. I'm honestly not sure whether it is worth spending effort on it. |
@bors: r+ |
📌 Commit 2cb8cdc has been approved by |
☔ The latest upstream changes (presumably #36969) made this pull request unmergeable. Please resolve the merge conflicts. |
@bors r=nrc |
📌 Commit 4a91a80 has been approved by |
Fix some pretty printing tests Many pretty-printing tests are un-ignored. Some issues in classification of comments (trailing/isolated) and blank line counting are fixed. Some comments are printed more carefully. Some minor refactoring in pprust.rs `no-pretty-expanded` annotations are removed because this is the default now. `pretty-expanded` annotations are removed from compile-fail tests, they are not tested with pretty-printer. Closes rust-lang#23623 in favor of more specific rust-lang#37201 and rust-lang#37199 r? @nrc
Fix some pretty printing tests Many pretty-printing tests are un-ignored. Some issues in classification of comments (trailing/isolated) and blank line counting are fixed. Some comments are printed more carefully. Some minor refactoring in pprust.rs `no-pretty-expanded` annotations are removed because this is the default now. `pretty-expanded` annotations are removed from compile-fail tests, they are not tested with pretty-printer. Closes rust-lang#23623 in favor of more specific rust-lang#37201 and rust-lang#37199 r? @nrc
Many pretty-printing tests are un-ignored.
Some issues in classification of comments (trailing/isolated) and blank line counting are fixed.
Some comments are printed more carefully.
Some minor refactoring in pprust.rs
no-pretty-expanded
annotations are removed because this is the default now.pretty-expanded
annotations are removed from compile-fail tests, they are not tested with pretty-printer.Closes #23623 in favor of more specific #37201 and #37199
r? @nrc