@@ -87,7 +87,7 @@ impl Step for CrateBootstrap {
8787 & [ ] ,
8888 ) ;
8989 let crate_name = path. rsplit_once ( '/' ) . unwrap ( ) . 1 ;
90- run_cargo_test ( cargo, & [ ] , & [ ] , crate_name, crate_name, compiler , bootstrap_host, builder) ;
90+ run_cargo_test ( cargo, & [ ] , & [ ] , crate_name, crate_name, bootstrap_host, builder) ;
9191 }
9292}
9393
@@ -143,7 +143,6 @@ You can skip linkcheck with --skip src/tools/linkchecker"
143143 & [ ] ,
144144 "linkchecker" ,
145145 "linkchecker self tests" ,
146- compiler,
147146 bootstrap_host,
148147 builder,
149148 ) ;
@@ -397,7 +396,7 @@ impl Step for RustAnalyzer {
397396 cargo. env ( "SKIP_SLOW_TESTS" , "1" ) ;
398397
399398 cargo. add_rustc_lib_path ( builder) ;
400- run_cargo_test ( cargo, & [ ] , & [ ] , "rust-analyzer" , "rust-analyzer" , compiler , host, builder) ;
399+ run_cargo_test ( cargo, & [ ] , & [ ] , "rust-analyzer" , "rust-analyzer" , host, builder) ;
401400 }
402401}
403402
@@ -445,7 +444,7 @@ impl Step for Rustfmt {
445444
446445 cargo. add_rustc_lib_path ( builder) ;
447446
448- run_cargo_test ( cargo, & [ ] , & [ ] , "rustfmt" , "rustfmt" , compiler , host, builder) ;
447+ run_cargo_test ( cargo, & [ ] , & [ ] , "rustfmt" , "rustfmt" , host, builder) ;
449448 }
450449}
451450
@@ -713,16 +712,7 @@ impl Step for CompiletestTest {
713712 & [ ] ,
714713 ) ;
715714 cargo. allow_features ( "test" ) ;
716- run_cargo_test (
717- cargo,
718- & [ ] ,
719- & [ ] ,
720- "compiletest" ,
721- "compiletest self test" ,
722- compiler,
723- host,
724- builder,
725- ) ;
715+ run_cargo_test ( cargo, & [ ] , & [ ] , "compiletest" , "compiletest self test" , host, builder) ;
726716 }
727717}
728718
@@ -1294,7 +1284,6 @@ impl Step for CrateRunMakeSupport {
12941284 & [ ] ,
12951285 "run-make-support" ,
12961286 "run-make-support self test" ,
1297- compiler,
12981287 host,
12991288 builder,
13001289 ) ;
@@ -1334,16 +1323,7 @@ impl Step for CrateBuildHelper {
13341323 & [ ] ,
13351324 ) ;
13361325 cargo. allow_features ( "test" ) ;
1337- run_cargo_test (
1338- cargo,
1339- & [ ] ,
1340- & [ ] ,
1341- "build_helper" ,
1342- "build_helper self test" ,
1343- compiler,
1344- host,
1345- builder,
1346- ) ;
1326+ run_cargo_test ( cargo, & [ ] , & [ ] , "build_helper" , "build_helper self test" , host, builder) ;
13471327 }
13481328}
13491329
@@ -2540,17 +2520,16 @@ impl Step for CrateLibrustc {
25402520/// Given a `cargo test` subcommand, add the appropriate flags and run it.
25412521///
25422522/// Returns whether the test succeeded.
2543- #[ allow( clippy:: too_many_arguments) ] // FIXME: reduce the number of args and remove this.
25442523fn run_cargo_test < ' a > (
2545- cargo : impl Into < BootstrapCommand > ,
2524+ cargo : builder :: Cargo ,
25462525 libtest_args : & [ & str ] ,
25472526 crates : & [ String ] ,
25482527 primary_crate : & str ,
25492528 description : impl Into < Option < & ' a str > > ,
2550- compiler : Compiler ,
25512529 target : TargetSelection ,
25522530 builder : & Builder < ' _ > ,
25532531) -> bool {
2532+ let compiler = cargo. compiler ( ) ;
25542533 let mut cargo =
25552534 prepare_cargo_test ( cargo, libtest_args, crates, primary_crate, compiler, target, builder) ;
25562535 let _time = helpers:: timeit ( builder) ;
@@ -2793,7 +2772,6 @@ impl Step for Crate {
27932772 & self . crates ,
27942773 & self . crates [ 0 ] ,
27952774 & * crate_description ( & self . crates ) ,
2796- compiler,
27972775 target,
27982776 builder,
27992777 ) ;
@@ -2895,7 +2873,6 @@ impl Step for CrateRustdoc {
28952873 & [ "rustdoc:0.0.0" . to_string ( ) ] ,
28962874 "rustdoc" ,
28972875 "rustdoc" ,
2898- compiler,
28992876 target,
29002877 builder,
29012878 ) ;
@@ -2956,7 +2933,6 @@ impl Step for CrateRustdocJsonTypes {
29562933 & [ "rustdoc-json-types" . to_string ( ) ] ,
29572934 "rustdoc-json-types" ,
29582935 "rustdoc-json-types" ,
2959- compiler,
29602936 target,
29612937 builder,
29622938 ) ;
@@ -3131,16 +3107,7 @@ impl Step for Bootstrap {
31313107
31323108 // bootstrap tests are racy on directory creation so just run them one at a time.
31333109 // Since there's not many this shouldn't be a problem.
3134- run_cargo_test (
3135- cargo,
3136- & [ "--test-threads=1" ] ,
3137- & [ ] ,
3138- "bootstrap" ,
3139- None ,
3140- compiler,
3141- host,
3142- builder,
3143- ) ;
3110+ run_cargo_test ( cargo, & [ "--test-threads=1" ] , & [ ] , "bootstrap" , None , host, builder) ;
31443111 }
31453112
31463113 fn should_run ( run : ShouldRun < ' _ > ) -> ShouldRun < ' _ > {
@@ -3265,7 +3232,7 @@ impl Step for RustInstaller {
32653232 bootstrap_host,
32663233 bootstrap_host,
32673234 ) ;
3268- run_cargo_test ( cargo, & [ ] , & [ ] , "installer" , None , compiler , bootstrap_host, builder) ;
3235+ run_cargo_test ( cargo, & [ ] , & [ ] , "installer" , None , bootstrap_host, builder) ;
32693236
32703237 // We currently don't support running the test.sh script outside linux(?) environments.
32713238 // Eventually this should likely migrate to #[test]s in rust-installer proper rather than a
@@ -3650,16 +3617,7 @@ impl Step for TestFloatParse {
36503617 & [ ] ,
36513618 ) ;
36523619
3653- run_cargo_test (
3654- cargo_test,
3655- & [ ] ,
3656- & [ ] ,
3657- crate_name,
3658- crate_name,
3659- compiler,
3660- bootstrap_host,
3661- builder,
3662- ) ;
3620+ run_cargo_test ( cargo_test, & [ ] , & [ ] , crate_name, crate_name, bootstrap_host, builder) ;
36633621
36643622 // Run the actual parse tests.
36653623 let mut cargo_run = tool:: prepare_tool_cargo (
0 commit comments