@@ -220,8 +220,11 @@ impl Step for TheBook {
220
220
// build the version info page and CSS
221
221
let shared_assets = builder. ensure ( SharedAssets { target } ) ;
222
222
223
+ // build the command first so we don't nest GHA groups
224
+ builder. rustdoc_cmd ( compiler) ;
225
+
223
226
// build the redirect pages
224
- builder. msg_doc ( compiler, "book redirect pages" , target) ;
227
+ let _guard = builder. msg_doc ( compiler, "book redirect pages" , target) ;
225
228
for file in t ! ( fs:: read_dir( builder. src. join( & relative_path) . join( "redirects" ) ) ) {
226
229
let file = t ! ( file) ;
227
230
let path = file. path ( ) ;
@@ -305,7 +308,7 @@ impl Step for Standalone {
305
308
fn run ( self , builder : & Builder < ' _ > ) {
306
309
let target = self . target ;
307
310
let compiler = self . compiler ;
308
- builder. msg_doc ( compiler, "standalone" , target) ;
311
+ let _guard = builder. msg_doc ( compiler, "standalone" , target) ;
309
312
let out = builder. doc_out ( target) ;
310
313
t ! ( fs:: create_dir_all( & out) ) ;
311
314
@@ -563,10 +566,6 @@ fn doc_std(
563
566
564
567
let compiler = builder. compiler ( stage, builder. config . build ) ;
565
568
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
-
570
569
let target_doc_dir_name = if format == DocumentationFormat :: JSON { "json-doc" } else { "doc" } ;
571
570
let target_dir =
572
571
builder. stage_out ( compiler, Mode :: Std ) . join ( target. triple ) . join ( target_doc_dir_name) ;
@@ -603,6 +602,10 @@ fn doc_std(
603
602
cargo. arg ( "-p" ) . arg ( krate) ;
604
603
}
605
604
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
+
606
609
builder. run ( & mut cargo. into ( ) ) ;
607
610
builder. cp_r ( & out_dir, & out) ;
608
611
}
@@ -799,8 +802,6 @@ macro_rules! tool_doc {
799
802
SourceType :: Submodule
800
803
} ;
801
804
802
- builder. msg_doc( compiler, stringify!( $tool) . to_lowercase( ) , target) ;
803
-
804
805
// Symlink compiler docs to the output directory of rustdoc documentation.
805
806
let out_dirs = [
806
807
builder. stage_out( compiler, Mode :: ToolRustc ) . join( target. triple) . join( "doc" ) ,
@@ -839,6 +840,8 @@ macro_rules! tool_doc {
839
840
cargo. rustdocflag( "--show-type-layout" ) ;
840
841
cargo. rustdocflag( "--generate-link-to-definition" ) ;
841
842
cargo. rustdocflag( "-Zunstable-options" ) ;
843
+
844
+ let _guard = builder. msg_doc( compiler, stringify!( $tool) . to_lowercase( ) , target) ;
842
845
builder. run( & mut cargo. into( ) ) ;
843
846
}
844
847
}
@@ -1060,7 +1063,16 @@ impl Step for RustcBook {
1060
1063
// config.toml), then this needs to explicitly update the dylib search
1061
1064
// path.
1062
1065
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
+ ) ;
1063
1073
builder. run ( & mut cmd) ;
1074
+ drop ( doc_generator_guard) ;
1075
+
1064
1076
// Run rustbook/mdbook to generate the HTML pages.
1065
1077
builder. ensure ( RustbookSrc {
1066
1078
target : self . target ,
0 commit comments