Rustfmt discards newlines between #[doc]
attributes and other attributes
#4604
Labels
#[doc]
attributes and other attributes
#4604
Input
Output
Expected output
I see here why rustfmt did this - it thinks that all cfg_attr attributes should be grouped together. But this doesn't make sense in the semantic context of the program:
cfg_attr(doc)
is a doc-comment and should be grouped with other doc-comments. See rust-lang/rust#80181 (comment) for a more realistic example.Is there a way to disable this behavior?
Meta
The text was updated successfully, but these errors were encountered: