@@ -220,8 +220,11 @@ impl Step for TheBook {
220220 // build the version info page and CSS
221221 let shared_assets = builder. ensure ( SharedAssets { target } ) ;
222222
223+ // build the command first so we don't nest GHA groups
224+ builder. rustdoc_cmd ( compiler) ;
225+
223226 // build the redirect pages
224- builder. msg_doc ( compiler, "book redirect pages" , target) ;
227+ let _guard = builder. msg_doc ( compiler, "book redirect pages" , target) ;
225228 for file in t ! ( fs:: read_dir( builder. src. join( & relative_path) . join( "redirects" ) ) ) {
226229 let file = t ! ( file) ;
227230 let path = file. path ( ) ;
@@ -305,7 +308,7 @@ impl Step for Standalone {
305308 fn run ( self , builder : & Builder < ' _ > ) {
306309 let target = self . target ;
307310 let compiler = self . compiler ;
308- builder. msg_doc ( compiler, "standalone" , target) ;
311+ let _guard = builder. msg_doc ( compiler, "standalone" , target) ;
309312 let out = builder. doc_out ( target) ;
310313 t ! ( fs:: create_dir_all( & out) ) ;
311314
@@ -563,10 +566,6 @@ fn doc_std(
563566
564567 let compiler = builder. compiler ( stage, builder. config . build ) ;
565568
566- let description =
567- format ! ( "library{} in {} format" , crate_description( & requested_crates) , format. as_str( ) ) ;
568- let _guard = builder. msg_doc ( compiler, & description, target) ;
569-
570569 let target_doc_dir_name = if format == DocumentationFormat :: JSON { "json-doc" } else { "doc" } ;
571570 let target_dir =
572571 builder. stage_out ( compiler, Mode :: Std ) . join ( target. triple ) . join ( target_doc_dir_name) ;
@@ -603,6 +602,10 @@ fn doc_std(
603602 cargo. arg ( "-p" ) . arg ( krate) ;
604603 }
605604
605+ let description =
606+ format ! ( "library{} in {} format" , crate_description( & requested_crates) , format. as_str( ) ) ;
607+ let _guard = builder. msg_doc ( compiler, & description, target) ;
608+
606609 builder. run ( & mut cargo. into ( ) ) ;
607610 builder. cp_r ( & out_dir, & out) ;
608611}
@@ -799,8 +802,6 @@ macro_rules! tool_doc {
799802 SourceType :: Submodule
800803 } ;
801804
802- builder. msg_doc( compiler, stringify!( $tool) . to_lowercase( ) , target) ;
803-
804805 // Symlink compiler docs to the output directory of rustdoc documentation.
805806 let out_dirs = [
806807 builder. stage_out( compiler, Mode :: ToolRustc ) . join( target. triple) . join( "doc" ) ,
@@ -839,6 +840,8 @@ macro_rules! tool_doc {
839840 cargo. rustdocflag( "--show-type-layout" ) ;
840841 cargo. rustdocflag( "--generate-link-to-definition" ) ;
841842 cargo. rustdocflag( "-Zunstable-options" ) ;
843+
844+ let _guard = builder. msg_doc( compiler, stringify!( $tool) . to_lowercase( ) , target) ;
842845 builder. run( & mut cargo. into( ) ) ;
843846 }
844847 }
@@ -1060,7 +1063,16 @@ impl Step for RustcBook {
10601063 // config.toml), then this needs to explicitly update the dylib search
10611064 // path.
10621065 builder. add_rustc_lib_path ( self . compiler , & mut cmd) ;
1066+ let doc_generator_guard = builder. msg (
1067+ Kind :: Run ,
1068+ self . compiler . stage ,
1069+ "lint-docs" ,
1070+ self . compiler . host ,
1071+ self . target ,
1072+ ) ;
10631073 builder. run ( & mut cmd) ;
1074+ drop ( doc_generator_guard) ;
1075+
10641076 // Run rustbook/mdbook to generate the HTML pages.
10651077 builder. ensure ( RustbookSrc {
10661078 target : self . target ,
0 commit comments