pprust: Improve pretty-printing of delimited token groups#62667
pprust: Improve pretty-printing of delimited token groups#62667bors merged 8 commits intorust-lang:masterfrom
Conversation
This comment has been minimized.
This comment has been minimized.
src/libsyntax/print/pprust.rs
Outdated
There was a problem hiding this comment.
Maybe we could take ast::Mac as an argument here? It looks like that would at least somewhat cut down on the arguments to this function -- path, delim, tts, and span are all in ast::Mac. But I'm not sure if it'd actually be an improvement :/
There was a problem hiding this comment.
With macro support it's even further from ast::Mac now.
There was a problem hiding this comment.
Yeah, I think it's probably not worth the attempt to do something yet -- definitely something for a future refactor I think.
|
r=me with Azure passing |
|
@bors r=Mark-Simulacrum |
|
📌 Commit 8574d0644443bfecf9b39f538a972d996a66c449 has been approved by |
|
☔ The latest upstream changes (presumably #62638) made this pull request unmergeable. Please resolve the merge conflicts. |
So that path and macro argument printing code can be shared
Wrap the whole attribute into a box instead
Fix some remaining cases of bad formatting Update some failing tests
|
@bors r=Mark-Simulacrum |
|
📌 Commit 0cdd18d has been approved by |
pprust: Improve pretty-printing of delimited token groups The commit "Do not convert attributes into `MetaItem`s for printing" fixes #62628. Other commits fix regressions from abandoning `MetaItem`s, and make formatting for attributes, macro calls, macro definitions and other delimited token groups better and more consistent. r? @Mark-Simulacrum
|
☀️ Test successful - checks-azure, checks-travis, status-appveyor |
Tested on commit rust-lang/rust@92b0f52. Direct link to PR: <rust-lang/rust#62667> 💔 rls on linux: test-pass → test-fail (cc @Xanewok, @rust-lang/infra).
The commit "Do not convert attributes into
MetaItems for printing" fixes #62628.Other commits fix regressions from abandoning
MetaItems, and make formatting for attributes, macro calls, macro definitions and other delimited token groups better and more consistent.r? @Mark-Simulacrum