Skip to content

Rustfmt removes comments in uses #3984

@WaffleLapkin

Description

@WaffleLapkin

Rustfmt sometimes removes comments in uses with {}. For example (diffs from cargo fmt -- --check):

-use a::{item /* comment */};
+use a::item;

With merge_imports = true:

-use a::{
-    x,
-    // comment
-    item,
-};
+use a::{item, x};

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-commentsArea: commentsA-importsArea: imports, e.g. `use` syntaxC-bugCategory: this is a bug; use also I-* labels for specific bug kinds, e.g. I-non-idempotency or I-ICE

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions