@@ -567,9 +567,9 @@ impl Step for Std {
567
567
stage : run. builder . top_stage ,
568
568
target : run. target ,
569
569
format : if run. builder . config . cmd . json ( ) {
570
- DocumentationFormat :: JSON
570
+ DocumentationFormat :: Json
571
571
} else {
572
- DocumentationFormat :: HTML
572
+ DocumentationFormat :: Html
573
573
} ,
574
574
crates : run. make_run_crates ( Alias :: Library ) ,
575
575
} ) ;
@@ -583,13 +583,13 @@ impl Step for Std {
583
583
let stage = self . stage ;
584
584
let target = self . target ;
585
585
let out = match self . format {
586
- DocumentationFormat :: HTML => builder. doc_out ( target) ,
587
- DocumentationFormat :: JSON => builder. json_doc_out ( target) ,
586
+ DocumentationFormat :: Html => builder. doc_out ( target) ,
587
+ DocumentationFormat :: Json => builder. json_doc_out ( target) ,
588
588
} ;
589
589
590
590
t ! ( fs:: create_dir_all( & out) ) ;
591
591
592
- if self . format == DocumentationFormat :: HTML {
592
+ if self . format == DocumentationFormat :: Html {
593
593
builder. ensure ( SharedAssets { target : self . target } ) ;
594
594
}
595
595
@@ -600,10 +600,10 @@ impl Step for Std {
600
600
. into_string ( )
601
601
. expect ( "non-utf8 paths are unsupported" ) ;
602
602
let mut extra_args = match self . format {
603
- DocumentationFormat :: HTML => {
603
+ DocumentationFormat :: Html => {
604
604
vec ! [ "--markdown-css" , "rust.css" , "--markdown-no-toc" , "--index-page" , & index_page]
605
605
}
606
- DocumentationFormat :: JSON => vec ! [ "--output-format" , "json" ] ,
606
+ DocumentationFormat :: Json => vec ! [ "--output-format" , "json" ] ,
607
607
} ;
608
608
609
609
if !builder. config . docs_minification {
@@ -613,7 +613,7 @@ impl Step for Std {
613
613
doc_std ( builder, self . format , stage, target, & out, & extra_args, & self . crates ) ;
614
614
615
615
// Don't open if the format is json
616
- if let DocumentationFormat :: JSON = self . format {
616
+ if let DocumentationFormat :: Json = self . format {
617
617
return ;
618
618
}
619
619
@@ -646,15 +646,15 @@ const STD_PUBLIC_CRATES: [&str; 5] = ["core", "alloc", "std", "proc_macro", "tes
646
646
647
647
#[ derive( Debug , Copy , Clone , Hash , PartialEq , Eq , PartialOrd , Ord ) ]
648
648
pub enum DocumentationFormat {
649
- HTML ,
650
- JSON ,
649
+ Html ,
650
+ Json ,
651
651
}
652
652
653
653
impl DocumentationFormat {
654
654
fn as_str ( & self ) -> & str {
655
655
match self {
656
- DocumentationFormat :: HTML => "HTML" ,
657
- DocumentationFormat :: JSON => "JSON" ,
656
+ DocumentationFormat :: Html => "HTML" ,
657
+ DocumentationFormat :: Json => "JSON" ,
658
658
}
659
659
}
660
660
}
@@ -678,7 +678,7 @@ fn doc_std(
678
678
679
679
let compiler = builder. compiler ( stage, builder. config . build ) ;
680
680
681
- let target_doc_dir_name = if format == DocumentationFormat :: JSON { "json-doc" } else { "doc" } ;
681
+ let target_doc_dir_name = if format == DocumentationFormat :: Json { "json-doc" } else { "doc" } ;
682
682
let target_dir =
683
683
builder. stage_out ( compiler, Mode :: Std ) . join ( target. triple ) . join ( target_doc_dir_name) ;
684
684
0 commit comments