@@ -311,7 +311,7 @@ impl Step for Cargo {
311
311
) ;
312
312
313
313
// 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) ;
315
315
316
316
// Don't run cross-compile tests, we may not have cross-compiled libstd libs
317
317
// available.
@@ -564,7 +564,7 @@ impl Step for Miri {
564
564
565
565
// We can NOT use `run_cargo_test` since Miri's integration tests do not use the usual test
566
566
// 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) ;
568
568
569
569
// miri tests need to know about the stage sysroot
570
570
cargo. env ( "MIRI_SYSROOT" , & miri_sysroot) ;
@@ -759,7 +759,7 @@ impl Step for Clippy {
759
759
cargo. env ( "HOST_LIBS" , host_libs) ;
760
760
761
761
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) ;
763
763
764
764
let _guard = builder. msg_sysroot_tool ( Kind :: Test , compiler. stage , "clippy" , host, host) ;
765
765
@@ -2530,8 +2530,7 @@ fn run_cargo_test<'a>(
2530
2530
builder : & Builder < ' _ > ,
2531
2531
) -> bool {
2532
2532
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) ;
2535
2534
let _time = helpers:: timeit ( builder) ;
2536
2535
let _group = description. into ( ) . and_then ( |what| {
2537
2536
builder. msg_sysroot_tool ( Kind :: Test , compiler. stage , what, compiler. host , target)
@@ -2552,15 +2551,15 @@ fn run_cargo_test<'a>(
2552
2551
2553
2552
/// Given a `cargo test` subcommand, pass it the appropriate test flags given a `builder`.
2554
2553
fn prepare_cargo_test (
2555
- cargo : impl Into < BootstrapCommand > ,
2554
+ cargo : builder :: Cargo ,
2556
2555
libtest_args : & [ & str ] ,
2557
2556
crates : & [ String ] ,
2558
2557
primary_crate : & str ,
2559
- compiler : Compiler ,
2560
2558
target : TargetSelection ,
2561
2559
builder : & Builder < ' _ > ,
2562
2560
) -> BootstrapCommand {
2563
- let mut cargo = cargo. into ( ) ;
2561
+ let compiler = cargo. compiler ( ) ;
2562
+ let mut cargo: BootstrapCommand = cargo. into ( ) ;
2564
2563
2565
2564
// Propagate `--bless` if it has not already been set/unset
2566
2565
// Any tools that want to use this should bless if `RUSTC_BLESS` is set to
0 commit comments