#6343·rustfmt

Whitespaces in path to macro inside derive block

Author: kuqmuaCreated Sep 22, 2024Updated Sep 17, 2026
LabelsC-bugI-poor-formattingA-derive-macro-attributes

"cargo fmt" command does not remove white spaces in derive block. For example i expected this

rust
#[derive(serde :: Serialize)]
enum Something {
    Variant
}

to become this

rust
#[derive(serde::Serialize)]
enum Something {
    Variant
}

cannot find anything similar in https://rust-lang.github.io/rustfmt/?version=master&search= tried to find by words "space" or "derive" (default config)