diff --git a/Configurations.md b/Configurations.md index 8b4dd0ca157..6f429d4a1c2 100644 --- a/Configurations.md +++ b/Configurations.md @@ -3105,9 +3105,9 @@ fn main() { ## `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. +This option is deprecated and has been replaced by [`style_edition`](#style_edition). +`version = "One"` is equivalent to `style_edition = "(2015|2018|2021)"` and +`version = "Two"` is equivalent to `style_edition = "2024"` - **Default value**: `One` - **Possible values**: `One`, `Two` diff --git a/src/config/config_type.rs b/src/config/config_type.rs index 14217caba0a..afac8d3fcf9 100644 --- a/src/config/config_type.rs +++ b/src/config/config_type.rs @@ -571,7 +571,11 @@ macro_rules! create_config { eprintln!( "Warning: the `version` option is deprecated. \ - Use `style_edition` instead." + Use `style_edition=\"{0}\"` instead.", + match self.version.2 { + Version::One => "2015", + Version::Two => "2024", + } ); if self.was_set().style_edition() || self.was_set_cli().style_edition() {