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
If I have A multi line comment in an extern block preceding a function declaration, it is removed. But not a single line comment.
To Reproduce
If I have this code:
extern"C"{// A comment that is// spread out over// multiple linesfna();// A single line commentfnb();}
And format it with the nightly formatter. I end up with:
extern"C"{fna();// A single line commentfnb();}
Expected behavior
I expect both comments to be retained. As far as I know it's not invalid or unidiomatic to write a comment multi line comment on an extern declaration.
Describe the bug
If I have A multi line comment in an extern block preceding a function declaration, it is removed. But not a single line comment.
To Reproduce
If I have this code:
And format it with the nightly formatter. I end up with:
Expected behavior
I expect both comments to be retained. As far as I know it's not invalid or unidiomatic to write a comment multi line comment on an extern declaration.
Meta
rustfmt 1.4.26-nightly (293d7d0 2020-11-14)
cargo +nighty fmt
The text was updated successfully, but these errors were encountered: