Skip to content

doc website: stable options should indicate since when they're stable #4154

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
majewsky opened this issue May 2, 2020 · 1 comment
Closed

Comments

@majewsky
Copy link

majewsky commented May 2, 2020

I just saw this warning message:

$ cat rustfmt.toml
max_width = 100
chain_width = 80
$ rustfmt --edition 2018 src/main.rs
Warning: Unknown configuration option `chain_width`

This was surprising to me because, according to https://rust-lang.github.io/rustfmt/#chain_width, the chain_width option is stable. However, it appears that the documentation for chain_width was only added a few days ago in f1a44c5, i.e. after the release from which my rustfmt was built.

To avoid this confusion, it would be great if the doc website did not just say Stable: yes on stable options, but something like Stable: since $VERSION or Stable: since $DATE.

@calebcartwright
Copy link
Member

calebcartwright commented May 2, 2020

Hi @majewsky, this is actually due to the difference between what's been released and what hasn't (not stable vs. unstable). The Configuration options listed in https://github.com/rust-lang/rustfmt/blob/master/Configurations.md and http://rust-lang.github.io/rustfmt/ are reflective of the latest in source control, and not what's been published in a released version of rustfmt.

If you want to use chain_width today then you'll have to use rustfmt 2.0 and will have to build from source.

I'll add a note to these configuration pages to make that more clear, but the documentation of version/release specific config options is something we'll need to address as part of #4128 given the additional vectors.

Going to close this and track in #4128

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants