You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@jmj0502 This issue was resolved by your PR #5446. I'd like to include a test case for this before closing it. If you have some interest and time to open up a PR with a test case for this that would be great! A PR similar to #5469 would be great 😁
Describe the bug
When using comments within generic type parameters of a
trait
, rustfmt corrupts the code as follows:Input
Output
The same applies for
/* block comments */
:Input
Output
However, this issue doesn't seem to appear for
fn
s andstruct
s.To Reproduce
I ran
rustfmt
without any parameters, so justrustfmt some-file-containing-the-example-above.rs
.Expected behavior
I would expect the same formatting as for
struct
s andfn
s (see the struct playground linked above).Meta
rustfmt 1.4.30-nightly (acd94866 2020-12-20)
rustfmt +nightly
Additional remarks
The text was updated successfully, but these errors were encountered: