File tree 3 files changed +6
-10
lines changed
3 files changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -568,10 +568,6 @@ impl GetOptsOptions {
568
568
if let Some ( ref file_lines) = matches. opt_str ( "file-lines" ) {
569
569
options. file_lines = file_lines. parse ( ) ?;
570
570
}
571
- if let Some ( ref edition_str) = matches. opt_str ( "style-edition" ) {
572
- options. style_edition =
573
- Some ( style_edition_from_style_edition_str ( edition_str) ?) ;
574
- }
575
571
} else {
576
572
let mut unstable_options = vec ! [ ] ;
577
573
if matches. opt_present ( "skip-children" ) {
@@ -583,9 +579,6 @@ impl GetOptsOptions {
583
579
if matches. opt_present ( "file-lines" ) {
584
580
unstable_options. push ( "`--file-lines`" ) ;
585
581
}
586
- if matches. opt_present ( "style-edition" ) {
587
- unstable_options. push ( "`--style-edition`" ) ;
588
- }
589
582
if !unstable_options. is_empty ( ) {
590
583
let s = if unstable_options. len ( ) == 1 { "" } else { "s" } ;
591
584
return Err ( format_err ! (
@@ -661,6 +654,10 @@ impl GetOptsOptions {
661
654
}
662
655
}
663
656
657
+ if let Some ( ref edition_str) = matches. opt_str ( "style-edition" ) {
658
+ options. style_edition = Some ( style_edition_from_style_edition_str ( edition_str) ?) ;
659
+ }
660
+
664
661
Ok ( options)
665
662
}
666
663
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ pub(crate) mod style_edition;
29
29
// This macro defines configuration options used in rustfmt. Each option
30
30
// is defined as follows:
31
31
//
32
- // `name: value type, default value, is stable, description;`
32
+ // `name: value type, is stable, description;`
33
33
create_config ! {
34
34
// Fundamental stuff
35
35
max_width: MaxWidth , true , "Maximum width of each line" ;
@@ -149,7 +149,7 @@ create_config! {
149
149
blank_lines_lower_bound: BlankLinesLowerBound , false ,
150
150
"Minimum number of blank lines which must be put between items" ;
151
151
edition: EditionConfig , true , "The edition of the parser (RFC 2052)" ;
152
- style_edition: StyleEditionConfig , false , "The edition of the Style Guide (RFC 3338)" ;
152
+ style_edition: StyleEditionConfig , true , "The edition of the Style Guide (RFC 3338)" ;
153
153
version: VersionConfig , false , "Version of formatting rules" ;
154
154
inline_attribute_width: InlineAttributeWidth , false ,
155
155
"Write an item and its attribute on the same line \
Original file line number Diff line number Diff line change @@ -511,7 +511,6 @@ pub enum StyleEdition {
511
511
Edition2021 ,
512
512
#[ value = "2024" ]
513
513
#[ doc_hint = "2024" ]
514
- #[ unstable_variant]
515
514
/// [Edition 2024]().
516
515
Edition2024 ,
517
516
}
You can’t perform that action at this time.
0 commit comments