@@ -311,7 +311,7 @@ impl Step for Cargo {
311311 ) ;
312312
313313 // NOTE: can't use `run_cargo_test` because we need to overwrite `PATH`
314- let mut cargo = prepare_cargo_test ( cargo, & [ ] , & [ ] , "cargo" , compiler , self . host , builder) ;
314+ let mut cargo = prepare_cargo_test ( cargo, & [ ] , & [ ] , "cargo" , self . host , builder) ;
315315
316316 // Don't run cross-compile tests, we may not have cross-compiled libstd libs
317317 // available.
@@ -564,7 +564,7 @@ impl Step for Miri {
564564
565565 // We can NOT use `run_cargo_test` since Miri's integration tests do not use the usual test
566566 // harness and therefore do not understand the flags added by `add_flags_and_try_run_test`.
567- let mut cargo = prepare_cargo_test ( cargo, & [ ] , & [ ] , "miri" , host_compiler , host, builder) ;
567+ let mut cargo = prepare_cargo_test ( cargo, & [ ] , & [ ] , "miri" , host, builder) ;
568568
569569 // miri tests need to know about the stage sysroot
570570 cargo. env ( "MIRI_SYSROOT" , & miri_sysroot) ;
@@ -759,7 +759,7 @@ impl Step for Clippy {
759759 cargo. env ( "HOST_LIBS" , host_libs) ;
760760
761761 cargo. add_rustc_lib_path ( builder) ;
762- let cargo = prepare_cargo_test ( cargo, & [ ] , & [ ] , "clippy" , compiler , host, builder) ;
762+ let cargo = prepare_cargo_test ( cargo, & [ ] , & [ ] , "clippy" , host, builder) ;
763763
764764 let _guard = builder. msg_sysroot_tool ( Kind :: Test , compiler. stage , "clippy" , host, host) ;
765765
@@ -2530,8 +2530,7 @@ fn run_cargo_test<'a>(
25302530 builder : & Builder < ' _ > ,
25312531) -> bool {
25322532 let compiler = cargo. compiler ( ) ;
2533- let mut cargo =
2534- prepare_cargo_test ( cargo, libtest_args, crates, primary_crate, compiler, target, builder) ;
2533+ let mut cargo = prepare_cargo_test ( cargo, libtest_args, crates, primary_crate, target, builder) ;
25352534 let _time = helpers:: timeit ( builder) ;
25362535 let _group = description. into ( ) . and_then ( |what| {
25372536 builder. msg_sysroot_tool ( Kind :: Test , compiler. stage , what, compiler. host , target)
@@ -2552,15 +2551,15 @@ fn run_cargo_test<'a>(
25522551
25532552/// Given a `cargo test` subcommand, pass it the appropriate test flags given a `builder`.
25542553fn prepare_cargo_test (
2555- cargo : impl Into < BootstrapCommand > ,
2554+ cargo : builder :: Cargo ,
25562555 libtest_args : & [ & str ] ,
25572556 crates : & [ String ] ,
25582557 primary_crate : & str ,
2559- compiler : Compiler ,
25602558 target : TargetSelection ,
25612559 builder : & Builder < ' _ > ,
25622560) -> BootstrapCommand {
2563- let mut cargo = cargo. into ( ) ;
2561+ let compiler = cargo. compiler ( ) ;
2562+ let mut cargo: BootstrapCommand = cargo. into ( ) ;
25642563
25652564 // Propagate `--bless` if it has not already been set/unset
25662565 // Any tools that want to use this should bless if `RUSTC_BLESS` is set to
0 commit comments