rustfmt misformat when comment blocks are used #6426
Labels
a-comments
bug
Panic, non-idempotency, invalid code, etc.
only-with-option
requires a non-default option value to reproduce
misformat if two consecutive lines start with
/*
and the first line only contains comments and no actual code.rustfmt doesn't correctly parse the end (
*/
) of/*
code blocks. I use a code block to better see the offsets of each field of a type. Unfortunately this causes the second line/*
to be changed to just*
as if it is a continued comment line.It only happens if the line starts with
/*
and has only comments in this line..rustfmt.toml:
Input:
Output:
The text was updated successfully, but these errors were encountered: