Skip to content

Rustfmt puts single-line comment after wrong import when reordering imports #4027

Closed as not planned
@Boscop

Description

@Boscop

before rustfmt:

pub use views::*;
pub use foo::bar; // re-export for frontend

after (with import reordering enabled):

pub use foo::bar;
pub use views::*; // re-export for frontend

The comment is at the wrong import now. It should not just reorder the imports but also their comments with them!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions