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](https://github.com/rust-lang/rustfmt/issues/5083#issuecomment-1951011779): At the moment, it produces the following kinds of use lists: ```rust 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: ```rust 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.