@@ -1024,12 +1024,9 @@ macro_rules! tool_doc {
10241024 run. builder. ensure( Rustc :: from_build_compiler( run. builder, compilers. build_compiler( ) , target) ) ;
10251025 compilers. build_compiler( )
10261026 }
1027- Mode :: ToolBootstrap => {
1028- // bootstrap/host tools should be documented with the stage 0 compiler
1029- prepare_doc_compiler( run. builder, run. builder. host_target, 1 )
1030- }
10311027 Mode :: ToolTarget => {
1032- // target tools should be documented with the in-tree compiler
1028+ // when shipping multiple docs together in one folder,
1029+ // they all need to use the same rustdoc version
10331030 prepare_doc_compiler( run. builder, run. builder. host_target, run. builder. top_stage)
10341031 }
10351032 _ => {
@@ -1132,7 +1129,11 @@ macro_rules! tool_doc {
11321129tool_doc ! (
11331130 BuildHelper ,
11341131 "src/build_helper" ,
1135- mode = Mode :: ToolBootstrap ,
1132+ // ideally, this would use ToolBootstrap,
1133+ // but we distribute these docs together in the same folder
1134+ // as a bunch of stage1 tools, and you can't mix rustdoc versions
1135+ // because that breaks cross-crate data (particularly search)
1136+ mode = Mode :: ToolTarget ,
11361137 is_library = true ,
11371138 crates = [ "build_helper" ]
11381139) ;
@@ -1175,25 +1176,25 @@ tool_doc!(
11751176 // "specialization" feature in its build script when it detects a nightly toolchain.
11761177 allow_features: "specialization"
11771178) ;
1178- tool_doc ! ( Tidy , "src/tools/tidy" , mode = Mode :: ToolBootstrap , crates = [ "tidy" ] ) ;
1179+ tool_doc ! ( Tidy , "src/tools/tidy" , mode = Mode :: ToolTarget , crates = [ "tidy" ] ) ;
11791180tool_doc ! (
11801181 Bootstrap ,
11811182 "src/bootstrap" ,
1182- mode = Mode :: ToolBootstrap ,
1183+ mode = Mode :: ToolTarget ,
11831184 is_library = true ,
11841185 crates = [ "bootstrap" ]
11851186) ;
11861187tool_doc ! (
11871188 RunMakeSupport ,
11881189 "src/tools/run-make-support" ,
1189- mode = Mode :: ToolBootstrap ,
1190+ mode = Mode :: ToolTarget ,
11901191 is_library = true ,
11911192 crates = [ "run_make_support" ]
11921193) ;
11931194tool_doc ! (
11941195 Compiletest ,
11951196 "src/tools/compiletest" ,
1196- mode = Mode :: ToolBootstrap ,
1197+ mode = Mode :: ToolTarget ,
11971198 is_library = true ,
11981199 crates = [ "compiletest" ]
11991200) ;
0 commit comments