imports_granularity=Item
removes #[cfg()]
attribute from imports
#5030
Labels
bug
Panic, non-idempotency, invalid code, etc.
help wanted
only-with-option
requires a non-default option value to reproduce
If I format this file
with
rustfmt --config imports_granularity=Item
,rustfmt
removes thecfg
attribute:$ rustfmt --config imports_granularity=Item main.rs
Output:
This only happens if there is more than one import in the
use
statement, i. e. formattingcorrectly retains the attribute.
rustfmt
was installed viarustup
, current nightly:The text was updated successfully, but these errors were encountered: