Skip to content

Commit

Permalink
Merge branch 'master' into issue-6339
Browse files Browse the repository at this point in the history
  • Loading branch information
dqkqd authored Oct 10, 2024
2 parents 206b944 + a2625bf commit 2a777e1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Configurations.md
Original file line number Diff line number Diff line change
Expand Up @@ -3062,7 +3062,9 @@ fn main() {

## `version`

This option is deprecated and has been replaced by [`style_edition`](#style_edition)
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`
Expand Down
6 changes: 5 additions & 1 deletion src/config/config_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 2a777e1

Please sign in to comment.