Open
Description
Describe the bug
I have the following piece of code:
pub trait Foo<'a, 'b>
where
'a: 'b, // Some random comment
{
}
Which rustfmt reformats to:
pub trait Foo<'a, 'b>
where
'a: 'b,
{
}
Deleting the comment
To Reproduce
Run cargo fmt
with the first code block results in the second code block
Expected behavior
The comment should not be deleted
Meta
- rustfmt version:
rustfmt 1.4.25-stable
. Reddit user u/m0rphism also reports it can be reproduced withrustfmt 1.4.9-nightly
- From where did you install rustfmt?:
rustup
- How do you run rustfmt:
cargo fmt
& from vscode