Skip to content

Commit ef91154

Browse files
authoredSep 19, 2022
docs: expand behavior of imports_granularity re: groups (rust-lang#5543)
1 parent 38659ec commit ef91154

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed
 

‎Configurations.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -1857,13 +1857,16 @@ pub enum Foo {}
18571857

18581858
## `imports_granularity`
18591859

1860-
How imports should be grouped into `use` statements. Imports will be merged or split to the configured level of granularity.
1860+
Controls how imports are structured in `use` statements. Imports will be merged or split to the configured level of granularity.
1861+
1862+
Similar to other `import` related configuration options, this option operates within the bounds of user-defined groups of imports. See [`group_imports`](#group_imports) for more information on import groups.
1863+
1864+
Note that rustfmt will not modify the granularity of imports containing comments if doing so could potentially lose or misplace said comments.
18611865

18621866
- **Default value**: `Preserve`
18631867
- **Possible values**: `Preserve`, `Crate`, `Module`, `Item`, `One`
18641868
- **Stable**: No (tracking issue: [#4991](https://github.com/rust-lang/rustfmt/issues/4991))
18651869

1866-
Note that rustfmt will not modify the granularity of imports containing comments if doing so could potentially lose or misplace said comments.
18671870

18681871
#### `Preserve` (default):
18691872

0 commit comments

Comments
 (0)
Please sign in to comment.