Skip to content

Commit

Permalink
docs: expand behavior of imports_granularity re: groups (#5543)
Browse files Browse the repository at this point in the history
  • Loading branch information
calebcartwright authored Sep 19, 2022
1 parent 38659ec commit ef91154
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Configurations.md
Original file line number Diff line number Diff line change
Expand Up @@ -1857,13 +1857,16 @@ pub enum Foo {}

## `imports_granularity`

How imports should be grouped into `use` statements. Imports will be merged or split to the configured level of granularity.
Controls how imports are structured in `use` statements. Imports will be merged or split to the configured level of granularity.

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.

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

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

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

#### `Preserve` (default):

Expand Down

0 comments on commit ef91154

Please sign in to comment.