Skip to content

Pretty-print mode to replace glob imports with a precise list of names #4786

Closed
@bstrie

Description

@bstrie
13:58 < bstrie> is there a pretty-print mode to replace a glob import with a
                precise list of names?
13:59 <@pcwalton> bstrie: no unfortunately
13:59 <@pcwalton> good idea though

So if I have a file with this:

use foo::*;

...and of all the things that foo provides, I only ever end up using bar and baz, then it should rewrite the import to:

use foo::{bar, baz};

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-prettyArea: Pretty printing (including `-Z unpretty`)A-resolveArea: Name/path resolution done by `rustc_resolve` specifically

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions