@@ -567,9 +567,9 @@ impl Step for Std {
567567 stage : run. builder . top_stage ,
568568 target : run. target ,
569569 format : if run. builder . config . cmd . json ( ) {
570- DocumentationFormat :: JSON
570+ DocumentationFormat :: Json
571571 } else {
572- DocumentationFormat :: HTML
572+ DocumentationFormat :: Html
573573 } ,
574574 crates : run. make_run_crates ( Alias :: Library ) ,
575575 } ) ;
@@ -583,13 +583,13 @@ impl Step for Std {
583583 let stage = self . stage ;
584584 let target = self . target ;
585585 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) ,
588588 } ;
589589
590590 t ! ( fs:: create_dir_all( & out) ) ;
591591
592- if self . format == DocumentationFormat :: HTML {
592+ if self . format == DocumentationFormat :: Html {
593593 builder. ensure ( SharedAssets { target : self . target } ) ;
594594 }
595595
@@ -600,10 +600,10 @@ impl Step for Std {
600600 . into_string ( )
601601 . expect ( "non-utf8 paths are unsupported" ) ;
602602 let mut extra_args = match self . format {
603- DocumentationFormat :: HTML => {
603+ DocumentationFormat :: Html => {
604604 vec ! [ "--markdown-css" , "rust.css" , "--markdown-no-toc" , "--index-page" , & index_page]
605605 }
606- DocumentationFormat :: JSON => vec ! [ "--output-format" , "json" ] ,
606+ DocumentationFormat :: Json => vec ! [ "--output-format" , "json" ] ,
607607 } ;
608608
609609 if !builder. config . docs_minification {
@@ -613,7 +613,7 @@ impl Step for Std {
613613 doc_std ( builder, self . format , stage, target, & out, & extra_args, & self . crates ) ;
614614
615615 // Don't open if the format is json
616- if let DocumentationFormat :: JSON = self . format {
616+ if let DocumentationFormat :: Json = self . format {
617617 return ;
618618 }
619619
@@ -646,15 +646,15 @@ const STD_PUBLIC_CRATES: [&str; 5] = ["core", "alloc", "std", "proc_macro", "tes
646646
647647#[ derive( Debug , Copy , Clone , Hash , PartialEq , Eq , PartialOrd , Ord ) ]
648648pub enum DocumentationFormat {
649- HTML ,
650- JSON ,
649+ Html ,
650+ Json ,
651651}
652652
653653impl DocumentationFormat {
654654 fn as_str ( & self ) -> & str {
655655 match self {
656- DocumentationFormat :: HTML => "HTML" ,
657- DocumentationFormat :: JSON => "JSON" ,
656+ DocumentationFormat :: Html => "HTML" ,
657+ DocumentationFormat :: Json => "JSON" ,
658658 }
659659 }
660660}
@@ -678,7 +678,7 @@ fn doc_std(
678678
679679 let compiler = builder. compiler ( stage, builder. config . build ) ;
680680
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" } ;
682682 let target_dir =
683683 builder. stage_out ( compiler, Mode :: Std ) . join ( target. triple ) . join ( target_doc_dir_name) ;
684684
0 commit comments