`unstable_features` does absolutely nothing
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 7k
- Forks
- 1.1k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 24
Description
rustfmt 1.4.37-stable (59eed8a2 2021-11-01)
Given a rustfmt.toml that looks like
unstable_features = <val>
imports_layout = "Vertical" # Some unstable feature
Files are formatted according to the following table
| +stable | +nightly | |
|---|---|---|
unstable_features = true |
ignores unstable features | uses unstable features |
unstable_features = false |
ignores unstable features | uses unstable features |
So the value of unstable_features does absolutely nothing except cause rustfmt to emit one of the following warnings when using a stable toochain
Warning: can't set `unstable_features = true`, unstable features are only available in nightly channel.
Warning: can't set `unstable_features = false`, unstable features are only available in nightly channel.
which is ridiculous.
Either this key should allow you to enable unstable formatting settings for stable toolchains, or it should allow you to disable unstable formatting settings for nightly toolchains. Preferably both. It currently has no effect at all.
There is a bug here.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the rustfmt.toml configuration with unstable_features and imports_layout on the stable and nightly toolchains described in the issue. Trace how unstable_features is handled and verify the chosen behavior against both toolchain cases; done means the setting has an observable, documented effect or is removed with its misleading warnings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100