-
Notifications
You must be signed in to change notification settings - Fork 901
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
trait bounds with comments are not formatted #2055
Comments
To fix this, we need to extract comments between
...which is, a lot of work. I hope that in the future we generalize |
Would this be easier if rustfmt wouldn't reorder the trait bounds at all? (that is, keep the trait bounds in the declared order, align them properly, put one per line, etc, but don't reorder them) |
No, not really, the hard bit is processing the source, rather than formatting the output |
This is now somewhat addressed. We no longer corrupt the trait bounds, but we don't do any formatting at all if there are comments. |
Thanks @nrc :) step by step!
…On Fri 10. Nov 2017 at 22:20, Nick Cameron ***@***.***> wrote:
This is now somewhat addressed. We no longer corrupt the trait bounds, but
we don't do any formatting at all.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2055 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA3NpqtR8gVrbvUeRq9Vu7IDmS1fPoPcks5s1L4JgaJpZM4P1j9I>
.
|
PR #4666 enhance the resolution of this issue by handling comments between the Trait Generics and Bounds, e.g. the |
This compiles file:
but
rustfmt
formats it into this:try this live (just click on
Format
in the playground)which fails to compile with:
The text was updated successfully, but these errors were encountered: