Skip to content

Commit d38f145

Browse files
docs: update unstable_features cfg info
1 parent 386d38a commit d38f145

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

Configurations.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2395,11 +2395,18 @@ fn lorem<Ipsum: Dolor+Sit=Amet>() {
23952395

23962396
## `unstable_features`
23972397

2398-
Enable unstable features on the unstable channel.
2398+
Enable unstable features on stable and beta channels (unstable features are available by default on nightly).
23992399

24002400
- **Default value**: `false`
24012401
- **Possible values**: `true`, `false`
2402-
- **Stable**: No (tracking issue: [#3387](https://github.com/rust-lang/rustfmt/issues/3387))
2402+
- **Stable**: Yes
2403+
2404+
**Note** - if you are setting unstable configuration options via the CLI instead of the configuration file, then you should include a `unstable_features=true` item before any of the unstable items.
2405+
2406+
For example:
2407+
```bash
2408+
rustfmt src/lib.rs --config unstable_features=true merge_imports=true
2409+
```
24032410

24042411
## `use_field_init_shorthand`
24052412

0 commit comments

Comments
 (0)