Skip to content

Commit 2a777e1

Browse files
authored
Merge branch 'master' into issue-6339
2 parents 206b944 + a2625bf commit 2a777e1

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

Diff for: Configurations.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -3062,7 +3062,9 @@ fn main() {
30623062

30633063
## `version`
30643064

3065-
This option is deprecated and has been replaced by [`style_edition`](#style_edition)
3065+
This option is deprecated and has been replaced by [`style_edition`](#style_edition).
3066+
`version = "One"` is equivalent to `style_edition = "(2015|2018|2021)"` and
3067+
`version = "Two"` is equivalent to `style_edition = "2024"`
30663068

30673069
- **Default value**: `One`
30683070
- **Possible values**: `One`, `Two`

Diff for: src/config/config_type.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,11 @@ macro_rules! create_config {
571571

572572
eprintln!(
573573
"Warning: the `version` option is deprecated. \
574-
Use `style_edition` instead."
574+
Use `style_edition=\"{0}\"` instead.",
575+
match self.version.2 {
576+
Version::One => "2015",
577+
Version::Two => "2024",
578+
}
575579
);
576580

577581
if self.was_set().style_edition() || self.was_set_cli().style_edition() {

0 commit comments

Comments
 (0)