-
Notifications
You must be signed in to change notification settings - Fork 936
Open
Labels
a-imports`use` syntax`use` syntaxonly-with-optionrequires a non-default option value to reproducerequires a non-default option value to reproduce
Description
Documented behavior
The current docs for imports_granularity = "Module"
say this:
Merge imports from the same module into a single use statement. Conversely, imports from different modules are split into separate statements.
The current example in docs looks like this:
use foo::b::{f, g};
use foo::d::e;
use foo::{a, b, c};
use qux::{h, i};
Current formatting of "top-level" modules
For imports of a entire modules, when the path only has a single item (no submodules), the current output when using imports_granularity = "Module"
is to format like this:
use {library1, library2 as lib2, library3};
Suggested formatting of "top-level" modules
The docs say "imports from different modules are split into separate statements". My reading of the docs and my intuition would say the formatting should instead look like this:
use library1;
use library2 as lib2;
use library3;
iago-lito, tv42, teohhanhui and poshcoe
Metadata
Metadata
Assignees
Labels
a-imports`use` syntax`use` syntaxonly-with-optionrequires a non-default option value to reproducerequires a non-default option value to reproduce