Closed
Description
With normalize_comments
set to false
, running rustfmt can lead to empty lines between a block comment and a doc comment being removed.
Here is some example code:
/// Doc comment for func1
/*fn func1() {
let a = 5;
}*/
/// Doc comment for func2
fn func2() {
let b = 5;
}
When rustfmt is run, the fifth line will be deleted. This line is only deleted if line 6 is a doc comment; normal and block comments work properly.
It seems that an arbitrary number of empty lines can be between the block comment and the doc comment, they will all be deleted.