Skip to content

Tracking improvements to group_imports #87

@xStrom

Description

@xStrom

We would like to use the rustfmt setting group_imports = "StdExternalCrate".

The problem with it is that it mixes different visibility cases. As mentioned in the tracking thread:

At the moment, it produces the following kinds of use lists:

use a;
pub(crate) use b;
pub use c;
use d;
pub use x;
pub(crate) use z;

whereas it feels more natural for the sort order to be:

pub use c;
pub use x;
pub(crate) use b;
pub(crate) use z;
use a;
use d;

That is, sort by visibility then by item name.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions