@@ -599,6 +599,16 @@ impl Step for Std {
599599 fn run ( self , builder : & Builder < ' _ > ) {
600600 let stage = self . stage ;
601601 let target = self . target ;
602+ let crates = if self . crates . is_empty ( ) {
603+ builder
604+ . in_tree_crates ( "sysroot" , Some ( target) )
605+ . iter ( )
606+ . map ( |c| c. name . to_string ( ) )
607+ . collect ( )
608+ } else {
609+ self . crates
610+ } ;
611+
602612 let out = match self . format {
603613 DocumentationFormat :: Html => builder. doc_out ( target) ,
604614 DocumentationFormat :: Json => builder. json_doc_out ( target) ,
@@ -627,7 +637,7 @@ impl Step for Std {
627637 extra_args. push ( "--disable-minification" ) ;
628638 }
629639
630- doc_std ( builder, self . format , stage, target, & out, & extra_args, & self . crates ) ;
640+ doc_std ( builder, self . format , stage, target, & out, & extra_args, & crates) ;
631641
632642 // Don't open if the format is json
633643 if let DocumentationFormat :: Json = self . format {
@@ -639,7 +649,7 @@ impl Step for Std {
639649 let index = out. join ( "std" ) . join ( "index.html" ) ;
640650 builder. open_in_browser ( index) ;
641651 } else {
642- for requested_crate in & * self . crates {
652+ for requested_crate in crates {
643653 if STD_PUBLIC_CRATES . iter ( ) . any ( |& k| k == requested_crate) {
644654 let index = out. join ( requested_crate) . join ( "index.html" ) ;
645655 builder. open_in_browser ( index) ;
0 commit comments