rust-lang/rustfmt

"`version` option is deprecated", but documented as valid

Closed this issue · 1 comments

rustfmt.toml contains the following line:

version = "Two"

When I run cargo fmt I get the following warning:

Warning: the version` option is deprecated. Use `style_edition` instead.

However, the "version" is documented in this github repo's documentation here:
Configuring rustfmt: version

version

Which version of the formatting rules to use. Version::One is backwards-compatible with Rustfmt > 1.0. Other versions are only backwards compatible within a major version number.

Default value: One
Possible values: One, Two
Stable: No (tracking issue: #3383)

But there is no entry for "style_edition".

However, looking at the tracing issue listed above (3383) we see that "version" is now listed as "not planned".


This may simply be a matter of needing to link to up-to-date docs on the github site, but bears mentioning.

Edit: Ah, I see, the link defaults to v1.6. Perhaps that's reasonable. I'm on nightly and this may be the source of confusion. I'm not sure what version stable uses.
Image

Yeah, style_edition is documented in v1.8.0. A more detailed description of how style_edition relates to version can be found here.