@@ -257,31 +257,6 @@ fn parse_config_download_rustc_at(path: &Path, download_rustc: &str, ci: bool) -
257
257
)
258
258
}
259
259
260
- mod defaults {
261
- use pretty_assertions:: assert_eq;
262
-
263
- use super :: { TEST_TRIPLE_1 , TEST_TRIPLE_2 , configure, first, run_build} ;
264
- use crate :: Config ;
265
- use crate :: core:: builder:: * ;
266
-
267
- #[ test]
268
- fn doc_default ( ) {
269
- let mut config = configure ( "doc" , & [ TEST_TRIPLE_1 ] , & [ TEST_TRIPLE_1 ] ) ;
270
- config. compiler_docs = true ;
271
- config. cmd = Subcommand :: Doc { open : false , json : false } ;
272
- let mut cache = run_build ( & [ ] , config) ;
273
- let a = TargetSelection :: from_user ( TEST_TRIPLE_1 ) ;
274
-
275
- // error_index_generator uses stage 0 to share rustdoc artifacts with the
276
- // rustdoc tool.
277
- assert_eq ! ( first( cache. all:: <doc:: ErrorIndex >( ) ) , & [ doc:: ErrorIndex { target: a } , ] ) ;
278
- assert_eq ! (
279
- first( cache. all:: <tool:: ErrorIndex >( ) ) ,
280
- & [ tool:: ErrorIndex { compiler: Compiler :: new( 1 , a) } ]
281
- ) ;
282
- }
283
- }
284
-
285
260
mod dist {
286
261
use pretty_assertions:: assert_eq;
287
262
@@ -309,28 +284,6 @@ mod dist {
309
284
let target = TargetSelection :: from_user ( TEST_TRIPLE_1 ) ;
310
285
assert ! ( build. llvm_out( target) . ends_with( "llvm" ) ) ;
311
286
}
312
-
313
- #[ test]
314
- fn doc_ci ( ) {
315
- let mut config = configure ( & [ TEST_TRIPLE_1 ] , & [ TEST_TRIPLE_1 ] ) ;
316
- config. compiler_docs = true ;
317
- config. cmd = Subcommand :: Doc { open : false , json : false } ;
318
- let build = Build :: new ( config) ;
319
- let mut builder = Builder :: new ( & build) ;
320
- builder. run_step_descriptions ( & Builder :: get_step_descriptions ( Kind :: Doc ) , & [ ] ) ;
321
- let a = TargetSelection :: from_user ( TEST_TRIPLE_1 ) ;
322
-
323
- // error_index_generator uses stage 1 to share rustdoc artifacts with the
324
- // rustdoc tool.
325
- assert_eq ! (
326
- first( builder. cache. all:: <doc:: ErrorIndex >( ) ) ,
327
- & [ doc:: ErrorIndex { target: a } , ]
328
- ) ;
329
- assert_eq ! (
330
- first( builder. cache. all:: <tool:: ErrorIndex >( ) ) ,
331
- & [ tool:: ErrorIndex { compiler: Compiler :: new( 1 , a) } ]
332
- ) ;
333
- }
334
287
}
335
288
336
289
mod sysroot_target_dirs {
@@ -888,6 +841,19 @@ mod snapshot {
888
841
" ) ;
889
842
}
890
843
844
+ #[ test]
845
+ fn build_error_index ( ) {
846
+ let ctx = TestCtx :: new ( ) ;
847
+ insta:: assert_snapshot!(
848
+ ctx. config( "build" )
849
+ . path( "error_index_generator" )
850
+ . render_steps( ) , @r"
851
+ [build] llvm <host>
852
+ [build] rustc 0 <host> -> rustc 1 <host>
853
+ [build] rustc 0 <host> -> error-index 1 <host>
854
+ " ) ;
855
+ }
856
+
891
857
#[ test]
892
858
fn build_bootstrap_tool_no_explicit_stage ( ) {
893
859
let ctx = TestCtx :: new ( ) ;
@@ -1032,6 +998,8 @@ mod snapshot {
1032
998
[build] rustc 1 <host> -> rustc 2 <host>
1033
999
[build] rustdoc 2 <host>
1034
1000
[doc] std 2 <host> crates=[alloc,compiler_builtins,core,panic_abort,panic_unwind,proc_macro,rustc-std-workspace-core,std,std_detect,sysroot,test,unwind]
1001
+ [build] rustc 1 <host> -> error-index 2 <host>
1002
+ [doc] rustc 1 <host> -> error-index 2 <host>
1035
1003
[build] rustc 2 <host> -> std 2 <host>
1036
1004
[build] rustc 0 <host> -> LintDocs 1 <host>
1037
1005
[build] rustc 0 <host> -> RustInstaller 1 <host>
@@ -1074,6 +1042,8 @@ mod snapshot {
1074
1042
[build] rustc 1 <host> -> LlvmBitcodeLinker 2 <host>
1075
1043
[build] rustdoc 2 <host>
1076
1044
[doc] std 2 <host> crates=[alloc,compiler_builtins,core,panic_abort,panic_unwind,proc_macro,rustc-std-workspace-core,std,std_detect,sysroot,test,unwind]
1045
+ [build] rustc 1 <host> -> error-index 2 <host>
1046
+ [doc] rustc 1 <host> -> error-index 2 <host>
1077
1047
[build] rustc 2 <host> -> std 2 <host>
1078
1048
[build] rustc 0 <host> -> LintDocs 1 <host>
1079
1049
[build] rustc 0 <host> -> RustInstaller 1 <host>
@@ -1114,6 +1084,8 @@ mod snapshot {
1114
1084
[build] rustdoc 2 <host>
1115
1085
[doc] std 2 <host> crates=[alloc,compiler_builtins,core,panic_abort,panic_unwind,proc_macro,rustc-std-workspace-core,std,std_detect,sysroot,test,unwind]
1116
1086
[doc] std 2 <target1> crates=[alloc,compiler_builtins,core,panic_abort,panic_unwind,proc_macro,rustc-std-workspace-core,std,std_detect,sysroot,test,unwind]
1087
+ [build] rustc 1 <host> -> error-index 2 <host>
1088
+ [doc] rustc 1 <host> -> error-index 2 <host>
1117
1089
[build] rustc 2 <host> -> std 2 <host>
1118
1090
[build] rustc 0 <host> -> LintDocs 1 <host>
1119
1091
[build] rustc 0 <host> -> RustInstaller 1 <host>
@@ -1150,18 +1122,22 @@ mod snapshot {
1150
1122
[build] rustc 1 <host> -> rustc 2 <host>
1151
1123
[build] rustdoc 2 <host>
1152
1124
[doc] std 2 <host> crates=[alloc,compiler_builtins,core,panic_abort,panic_unwind,proc_macro,rustc-std-workspace-core,std,std_detect,sysroot,test,unwind]
1125
+ [build] rustc 1 <host> -> error-index 2 <host>
1126
+ [doc] rustc 1 <host> -> error-index 2 <host>
1127
+ [build] llvm <target1>
1128
+ [build] rustc 1 <host> -> std 1 <target1>
1129
+ [build] rustc 1 <host> -> rustc 2 <target1>
1130
+ [build] rustc 1 <host> -> error-index 2 <target1>
1131
+ [doc] rustc 1 <host> -> error-index 2 <target1>
1153
1132
[build] rustc 2 <host> -> std 2 <host>
1154
1133
[build] rustc 0 <host> -> LintDocs 1 <host>
1155
- [build] rustc 1 <host> -> std 1 <target1>
1156
1134
[build] rustc 2 <host> -> std 2 <target1>
1157
1135
[build] rustc 0 <host> -> RustInstaller 1 <host>
1158
1136
[dist] docs <host>
1159
1137
[doc] std 2 <host> crates=[]
1160
1138
[dist] mingw <host>
1161
1139
[build] rustc 0 <host> -> GenerateCopyright 1 <host>
1162
1140
[dist] rustc <host>
1163
- [build] llvm <target1>
1164
- [build] rustc 1 <host> -> rustc 2 <target1>
1165
1141
[build] rustdoc 2 <target1>
1166
1142
[dist] rustc <target1>
1167
1143
[dist] rustc 1 <host> -> std 1 <host>
@@ -1188,9 +1164,15 @@ mod snapshot {
1188
1164
[build] rustdoc 2 <host>
1189
1165
[doc] std 2 <host> crates=[alloc,compiler_builtins,core,panic_abort,panic_unwind,proc_macro,rustc-std-workspace-core,std,std_detect,sysroot,test,unwind]
1190
1166
[doc] std 2 <target1> crates=[alloc,compiler_builtins,core,panic_abort,panic_unwind,proc_macro,rustc-std-workspace-core,std,std_detect,sysroot,test,unwind]
1167
+ [build] rustc 1 <host> -> error-index 2 <host>
1168
+ [doc] rustc 1 <host> -> error-index 2 <host>
1169
+ [build] llvm <target1>
1170
+ [build] rustc 1 <host> -> std 1 <target1>
1171
+ [build] rustc 1 <host> -> rustc 2 <target1>
1172
+ [build] rustc 1 <host> -> error-index 2 <target1>
1173
+ [doc] rustc 1 <host> -> error-index 2 <target1>
1191
1174
[build] rustc 2 <host> -> std 2 <host>
1192
1175
[build] rustc 0 <host> -> LintDocs 1 <host>
1193
- [build] rustc 1 <host> -> std 1 <target1>
1194
1176
[build] rustc 2 <host> -> std 2 <target1>
1195
1177
[build] rustc 0 <host> -> RustInstaller 1 <host>
1196
1178
[dist] docs <host>
@@ -1201,8 +1183,6 @@ mod snapshot {
1201
1183
[dist] mingw <target1>
1202
1184
[build] rustc 0 <host> -> GenerateCopyright 1 <host>
1203
1185
[dist] rustc <host>
1204
- [build] llvm <target1>
1205
- [build] rustc 1 <host> -> rustc 2 <target1>
1206
1186
[build] rustdoc 2 <target1>
1207
1187
[dist] rustc <target1>
1208
1188
[dist] rustc 1 <host> -> std 1 <host>
@@ -1261,17 +1241,19 @@ mod snapshot {
1261
1241
[build] rustc 1 <host> -> WasmComponentLd 2 <host>
1262
1242
[build] rustdoc 2 <host>
1263
1243
[doc] std 2 <target1> crates=[alloc,compiler_builtins,core,panic_abort,panic_unwind,proc_macro,rustc-std-workspace-core,std,std_detect,sysroot,test,unwind]
1264
- [build] rustc 2 <host> -> std 2 <host >
1244
+ [build] llvm <target1 >
1265
1245
[build] rustc 1 <host> -> std 1 <target1>
1246
+ [build] rustc 1 <host> -> rustc 2 <target1>
1247
+ [build] rustc 1 <host> -> WasmComponentLd 2 <target1>
1248
+ [build] rustc 1 <host> -> error-index 2 <target1>
1249
+ [doc] rustc 1 <host> -> error-index 2 <target1>
1250
+ [build] rustc 2 <host> -> std 2 <host>
1266
1251
[build] rustc 2 <host> -> std 2 <target1>
1267
1252
[build] rustc 0 <host> -> LintDocs 1 <host>
1268
1253
[build] rustc 0 <host> -> RustInstaller 1 <host>
1269
1254
[dist] docs <target1>
1270
1255
[doc] std 2 <target1> crates=[]
1271
1256
[dist] mingw <target1>
1272
- [build] llvm <target1>
1273
- [build] rustc 1 <host> -> rustc 2 <target1>
1274
- [build] rustc 1 <host> -> WasmComponentLd 2 <target1>
1275
1257
[build] rustdoc 2 <target1>
1276
1258
[build] rustc 1 <host> -> rust-analyzer-proc-macro-srv 2 <target1>
1277
1259
[build] rustc 0 <host> -> GenerateCopyright 1 <host>
@@ -1651,6 +1633,25 @@ mod snapshot {
1651
1633
" ) ;
1652
1634
}
1653
1635
1636
+ #[ test]
1637
+ fn doc_all ( ) {
1638
+ let ctx = TestCtx :: new ( ) ;
1639
+ insta:: assert_snapshot!(
1640
+ ctx. config( "doc" )
1641
+ . render_steps( ) , @r"
1642
+ [build] rustc 0 <host> -> UnstableBookGen 1 <host>
1643
+ [build] rustc 0 <host> -> Rustbook 1 <host>
1644
+ [build] llvm <host>
1645
+ [build] rustc 0 <host> -> rustc 1 <host>
1646
+ [build] rustdoc 1 <host>
1647
+ [doc] std 1 <host> crates=[alloc,compiler_builtins,core,panic_abort,panic_unwind,proc_macro,rustc-std-workspace-core,std,std_detect,sysroot,test,unwind]
1648
+ [build] rustc 0 <host> -> error-index 1 <host>
1649
+ [doc] rustc 0 <host> -> error-index 1 <host>
1650
+ [build] rustc 1 <host> -> std 1 <host>
1651
+ [build] rustc 0 <host> -> LintDocs 1 <host>
1652
+ " ) ;
1653
+ }
1654
+
1654
1655
#[ test]
1655
1656
fn doc_library ( ) {
1656
1657
let ctx = TestCtx :: new ( ) ;
0 commit comments