@@ -150,16 +150,13 @@ You can skip linkcheck with --skip src/tools/linkchecker"
150
150
builder. default_doc ( & [ ] ) ;
151
151
152
152
// Build the linkchecker before calling `msg`, since GHA doesn't support nested groups.
153
- let mut linkchecker = builder. tool_cmd ( Tool :: Linkchecker ) ;
153
+ let linkchecker = builder. tool_cmd ( Tool :: Linkchecker ) ;
154
154
155
155
// Run the linkchecker.
156
156
let _guard =
157
157
builder. msg ( Kind :: Test , compiler. stage , "Linkcheck" , bootstrap_host, bootstrap_host) ;
158
158
let _time = helpers:: timeit ( builder) ;
159
- builder. run (
160
- BootstrapCommand :: from ( linkchecker. arg ( builder. out . join ( host. triple ) . join ( "doc" ) ) )
161
- . delay_failure ( ) ,
162
- ) ;
159
+ builder. run ( linkchecker. delay_failure ( ) . arg ( builder. out . join ( host. triple ) . join ( "doc" ) ) ) ;
163
160
}
164
161
165
162
fn should_run ( run : ShouldRun < ' _ > ) -> ShouldRun < ' _ > {
@@ -217,10 +214,7 @@ impl Step for HtmlCheck {
217
214
) ) ;
218
215
219
216
builder. run (
220
- BootstrapCommand :: from (
221
- builder. tool_cmd ( Tool :: HtmlChecker ) . arg ( builder. doc_out ( self . target ) ) ,
222
- )
223
- . delay_failure ( ) ,
217
+ builder. tool_cmd ( Tool :: HtmlChecker ) . delay_failure ( ) . arg ( builder. doc_out ( self . target ) ) ,
224
218
) ;
225
219
}
226
220
}
@@ -260,14 +254,13 @@ impl Step for Cargotest {
260
254
261
255
let _time = helpers:: timeit ( builder) ;
262
256
let mut cmd = builder. tool_cmd ( Tool :: CargoTest ) ;
263
- let cmd = cmd
264
- . arg ( & cargo)
257
+ cmd. arg ( & cargo)
265
258
. arg ( & out_dir)
266
259
. args ( builder. config . test_args ( ) )
267
260
. env ( "RUSTC" , builder. rustc ( compiler) )
268
261
. env ( "RUSTDOC" , builder. rustdoc ( compiler) ) ;
269
- add_rustdoc_cargo_linker_args ( cmd, builder, compiler. host , LldThreads :: No ) ;
270
- builder. run ( BootstrapCommand :: from ( cmd) . delay_failure ( ) ) ;
262
+ add_rustdoc_cargo_linker_args ( & mut cmd, builder, compiler. host , LldThreads :: No ) ;
263
+ builder. run ( cmd. delay_failure ( ) ) ;
271
264
}
272
265
}
273
266
@@ -763,12 +756,12 @@ impl Step for Clippy {
763
756
cargo. env ( "HOST_LIBS" , host_libs) ;
764
757
765
758
cargo. add_rustc_lib_path ( builder) ;
766
- let mut cargo = prepare_cargo_test ( cargo, & [ ] , & [ ] , "clippy" , compiler, host, builder) ;
759
+ let cargo = prepare_cargo_test ( cargo, & [ ] , & [ ] , "clippy" , compiler, host, builder) ;
767
760
768
761
let _guard = builder. msg_sysroot_tool ( Kind :: Test , compiler. stage , "clippy" , host, host) ;
769
762
770
763
// Clippy reports errors if it blessed the outputs
771
- if builder. run ( BootstrapCommand :: from ( & mut cargo) . allow_failure ( ) ) . is_success ( ) {
764
+ if builder. run ( cargo. allow_failure ( ) ) . is_success ( ) {
772
765
// The tests succeeded; nothing to do.
773
766
return ;
774
767
}
@@ -821,7 +814,7 @@ impl Step for RustdocTheme {
821
814
. env ( "RUSTC_BOOTSTRAP" , "1" ) ;
822
815
cmd. args ( linker_args ( builder, self . compiler . host , LldThreads :: No ) ) ;
823
816
824
- builder. run ( BootstrapCommand :: from ( & mut cmd) . delay_failure ( ) ) ;
817
+ builder. run ( cmd. delay_failure ( ) ) ;
825
818
}
826
819
}
827
820
@@ -1099,7 +1092,7 @@ HELP: to skip test's attempt to check tidiness, pass `--skip src/tools/tidy` to
1099
1092
}
1100
1093
1101
1094
builder. info ( "tidy check" ) ;
1102
- builder. run ( BootstrapCommand :: from ( & mut cmd) . delay_failure ( ) ) ;
1095
+ builder. run ( cmd. delay_failure ( ) ) ;
1103
1096
1104
1097
builder. info ( "x.py completions check" ) ;
1105
1098
let [ bash, zsh, fish, powershell] = [ "x.py.sh" , "x.py.zsh" , "x.py.fish" , "x.py.ps1" ]
@@ -1306,7 +1299,7 @@ impl Step for RunMakeSupport {
1306
1299
& [ ] ,
1307
1300
) ;
1308
1301
1309
- builder. run ( cargo) ;
1302
+ builder. run ( cargo. into_cmd ( ) ) ;
1310
1303
1311
1304
let lib_name = "librun_make_support.rlib" ;
1312
1305
let lib = builder. tools_dir ( self . compiler ) . join ( lib_name) ;
@@ -2185,7 +2178,7 @@ impl BookTest {
2185
2178
compiler. host ,
2186
2179
) ;
2187
2180
let _time = helpers:: timeit ( builder) ;
2188
- let cmd = BootstrapCommand :: from ( & mut rustbook_cmd) . delay_failure ( ) ;
2181
+ let cmd = rustbook_cmd. delay_failure ( ) ;
2189
2182
let toolstate =
2190
2183
if builder. run ( cmd) . is_success ( ) { ToolState :: TestPass } else { ToolState :: TestFail } ;
2191
2184
builder. save_toolstate ( self . name , toolstate) ;
@@ -2316,7 +2309,7 @@ impl Step for ErrorIndex {
2316
2309
let guard =
2317
2310
builder. msg ( Kind :: Test , compiler. stage , "error-index" , compiler. host , compiler. host ) ;
2318
2311
let _time = helpers:: timeit ( builder) ;
2319
- builder. run ( BootstrapCommand :: from ( & mut tool) . output_mode ( OutputMode :: OnlyOnFailure ) ) ;
2312
+ builder. run ( tool. output_mode ( OutputMode :: OnlyOnFailure ) ) ;
2320
2313
drop ( guard) ;
2321
2314
// The tests themselves need to link to std, so make sure it is
2322
2315
// available.
@@ -2373,10 +2366,13 @@ impl Step for RustcGuide {
2373
2366
builder. update_submodule ( & relative_path) ;
2374
2367
2375
2368
let src = builder. src . join ( relative_path) ;
2376
- let mut rustbook_cmd = builder. tool_cmd ( Tool :: Rustbook ) ;
2377
- let cmd = BootstrapCommand :: from ( rustbook_cmd. arg ( "linkcheck" ) . arg ( & src) ) . delay_failure ( ) ;
2378
- let toolstate =
2379
- if builder. run ( cmd) . is_success ( ) { ToolState :: TestPass } else { ToolState :: TestFail } ;
2369
+ let mut rustbook_cmd = builder. tool_cmd ( Tool :: Rustbook ) . delay_failure ( ) ;
2370
+ rustbook_cmd. arg ( "linkcheck" ) . arg ( & src) ;
2371
+ let toolstate = if builder. run ( rustbook_cmd) . is_success ( ) {
2372
+ ToolState :: TestPass
2373
+ } else {
2374
+ ToolState :: TestFail
2375
+ } ;
2380
2376
builder. save_toolstate ( "rustc-dev-guide" , toolstate) ;
2381
2377
}
2382
2378
}
@@ -3345,7 +3341,7 @@ impl Step for CodegenCranelift {
3345
3341
. arg ( "testsuite.extended_sysroot" ) ;
3346
3342
cargo. args ( builder. config . test_args ( ) ) ;
3347
3343
3348
- builder. run ( cargo) ;
3344
+ builder. run ( cargo. into_cmd ( ) ) ;
3349
3345
}
3350
3346
}
3351
3347
@@ -3470,6 +3466,6 @@ impl Step for CodegenGCC {
3470
3466
. arg ( "--std-tests" ) ;
3471
3467
cargo. args ( builder. config . test_args ( ) ) ;
3472
3468
3473
- builder. run ( cargo) ;
3469
+ builder. run ( cargo. into_cmd ( ) ) ;
3474
3470
}
3475
3471
}
0 commit comments