@@ -87,7 +87,7 @@ impl Step for CrateBootstrap {
87
87
& [ ] ,
88
88
) ;
89
89
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) ;
91
91
}
92
92
}
93
93
@@ -143,7 +143,6 @@ You can skip linkcheck with --skip src/tools/linkchecker"
143
143
& [ ] ,
144
144
"linkchecker" ,
145
145
"linkchecker self tests" ,
146
- compiler,
147
146
bootstrap_host,
148
147
builder,
149
148
) ;
@@ -397,7 +396,7 @@ impl Step for RustAnalyzer {
397
396
cargo. env ( "SKIP_SLOW_TESTS" , "1" ) ;
398
397
399
398
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) ;
401
400
}
402
401
}
403
402
@@ -445,7 +444,7 @@ impl Step for Rustfmt {
445
444
446
445
cargo. add_rustc_lib_path ( builder) ;
447
446
448
- run_cargo_test ( cargo, & [ ] , & [ ] , "rustfmt" , "rustfmt" , compiler , host, builder) ;
447
+ run_cargo_test ( cargo, & [ ] , & [ ] , "rustfmt" , "rustfmt" , host, builder) ;
449
448
}
450
449
}
451
450
@@ -713,16 +712,7 @@ impl Step for CompiletestTest {
713
712
& [ ] ,
714
713
) ;
715
714
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) ;
726
716
}
727
717
}
728
718
@@ -1294,7 +1284,6 @@ impl Step for CrateRunMakeSupport {
1294
1284
& [ ] ,
1295
1285
"run-make-support" ,
1296
1286
"run-make-support self test" ,
1297
- compiler,
1298
1287
host,
1299
1288
builder,
1300
1289
) ;
@@ -1334,16 +1323,7 @@ impl Step for CrateBuildHelper {
1334
1323
& [ ] ,
1335
1324
) ;
1336
1325
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) ;
1347
1327
}
1348
1328
}
1349
1329
@@ -2540,17 +2520,16 @@ impl Step for CrateLibrustc {
2540
2520
/// Given a `cargo test` subcommand, add the appropriate flags and run it.
2541
2521
///
2542
2522
/// Returns whether the test succeeded.
2543
- #[ allow( clippy:: too_many_arguments) ] // FIXME: reduce the number of args and remove this.
2544
2523
fn run_cargo_test < ' a > (
2545
- cargo : impl Into < BootstrapCommand > ,
2524
+ cargo : builder :: Cargo ,
2546
2525
libtest_args : & [ & str ] ,
2547
2526
crates : & [ String ] ,
2548
2527
primary_crate : & str ,
2549
2528
description : impl Into < Option < & ' a str > > ,
2550
- compiler : Compiler ,
2551
2529
target : TargetSelection ,
2552
2530
builder : & Builder < ' _ > ,
2553
2531
) -> bool {
2532
+ let compiler = cargo. compiler ( ) ;
2554
2533
let mut cargo =
2555
2534
prepare_cargo_test ( cargo, libtest_args, crates, primary_crate, compiler, target, builder) ;
2556
2535
let _time = helpers:: timeit ( builder) ;
@@ -2793,7 +2772,6 @@ impl Step for Crate {
2793
2772
& self . crates ,
2794
2773
& self . crates [ 0 ] ,
2795
2774
& * crate_description ( & self . crates ) ,
2796
- compiler,
2797
2775
target,
2798
2776
builder,
2799
2777
) ;
@@ -2895,7 +2873,6 @@ impl Step for CrateRustdoc {
2895
2873
& [ "rustdoc:0.0.0" . to_string ( ) ] ,
2896
2874
"rustdoc" ,
2897
2875
"rustdoc" ,
2898
- compiler,
2899
2876
target,
2900
2877
builder,
2901
2878
) ;
@@ -2956,7 +2933,6 @@ impl Step for CrateRustdocJsonTypes {
2956
2933
& [ "rustdoc-json-types" . to_string ( ) ] ,
2957
2934
"rustdoc-json-types" ,
2958
2935
"rustdoc-json-types" ,
2959
- compiler,
2960
2936
target,
2961
2937
builder,
2962
2938
) ;
@@ -3131,16 +3107,7 @@ impl Step for Bootstrap {
3131
3107
3132
3108
// bootstrap tests are racy on directory creation so just run them one at a time.
3133
3109
// 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) ;
3144
3111
}
3145
3112
3146
3113
fn should_run ( run : ShouldRun < ' _ > ) -> ShouldRun < ' _ > {
@@ -3265,7 +3232,7 @@ impl Step for RustInstaller {
3265
3232
bootstrap_host,
3266
3233
bootstrap_host,
3267
3234
) ;
3268
- run_cargo_test ( cargo, & [ ] , & [ ] , "installer" , None , compiler , bootstrap_host, builder) ;
3235
+ run_cargo_test ( cargo, & [ ] , & [ ] , "installer" , None , bootstrap_host, builder) ;
3269
3236
3270
3237
// We currently don't support running the test.sh script outside linux(?) environments.
3271
3238
// Eventually this should likely migrate to #[test]s in rust-installer proper rather than a
@@ -3650,16 +3617,7 @@ impl Step for TestFloatParse {
3650
3617
& [ ] ,
3651
3618
) ;
3652
3619
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) ;
3663
3621
3664
3622
// Run the actual parse tests.
3665
3623
let mut cargo_run = tool:: prepare_tool_cargo (
0 commit comments