@@ -376,7 +376,7 @@ macro_rules! tool_check_step {
376
376
// The part of this path after the final '/' is also used as a display name.
377
377
path: $path: literal
378
378
$( , alt_path: $alt_path: literal ) *
379
- // Closure that returns `Mode` based on the passed `&Builder<'_>`
379
+ // Under which tool mode should the tool be checked with?
380
380
, mode: $mode: expr
381
381
// Subset of nightly features that are allowed to be used when checking
382
382
$( , allow_features: $allow_features: expr ) ?
@@ -404,8 +404,7 @@ macro_rules! tool_check_step {
404
404
405
405
fn make_run( run: RunConfig <' _>) {
406
406
let target = run. target;
407
- let builder = run. builder;
408
- let mode = $mode( builder) ;
407
+ let mode = $mode;
409
408
410
409
let build_compiler = prepare_compiler_for_check( run. builder, target, mode) ;
411
410
@@ -426,7 +425,7 @@ macro_rules! tool_check_step {
426
425
_value
427
426
} ;
428
427
let extra_features: & [ & str ] = & [ $( $( $enable_features) ,* ) ?] ;
429
- let mode = $mode( builder ) ;
428
+ let mode = $mode;
430
429
run_tool_check_step( builder, build_compiler, target, $path, mode, allow_features, extra_features) ;
431
430
}
432
431
@@ -493,66 +492,61 @@ fn run_tool_check_step(
493
492
tool_check_step ! ( Rustdoc {
494
493
path: "src/tools/rustdoc" ,
495
494
alt_path: "src/librustdoc" ,
496
- mode: |_builder| Mode :: ToolRustc
495
+ mode: Mode :: ToolRustc
497
496
} ) ;
498
497
// Clippy, miri and Rustfmt are hybrids. They are external tools, but use a git subtree instead
499
498
// of a submodule. Since the SourceType only drives the deny-warnings
500
499
// behavior, treat it as in-tree so that any new warnings in clippy will be
501
500
// rejected.
502
- tool_check_step ! ( Clippy { path: "src/tools/clippy" , mode: |_builder| Mode :: ToolRustc } ) ;
503
- tool_check_step ! ( Miri { path: "src/tools/miri" , mode: |_builder| Mode :: ToolRustc } ) ;
504
- tool_check_step ! ( CargoMiri { path: "src/tools/miri/cargo-miri" , mode: |_builder| Mode :: ToolRustc } ) ;
505
- tool_check_step ! ( Rustfmt { path: "src/tools/rustfmt" , mode: |_builder| Mode :: ToolRustc } ) ;
501
+ tool_check_step ! ( Clippy { path: "src/tools/clippy" , mode: Mode :: ToolRustc } ) ;
502
+ tool_check_step ! ( Miri { path: "src/tools/miri" , mode: Mode :: ToolRustc } ) ;
503
+ tool_check_step ! ( CargoMiri { path: "src/tools/miri/cargo-miri" , mode: Mode :: ToolRustc } ) ;
504
+ tool_check_step ! ( Rustfmt { path: "src/tools/rustfmt" , mode: Mode :: ToolRustc } ) ;
506
505
tool_check_step ! ( RustAnalyzer {
507
506
path: "src/tools/rust-analyzer" ,
508
- mode: |_builder| Mode :: ToolRustc ,
507
+ mode: Mode :: ToolRustc ,
509
508
allow_features: tool:: RustAnalyzer :: ALLOW_FEATURES ,
510
509
enable_features: [ "in-rust-tree" ] ,
511
510
} ) ;
512
511
tool_check_step ! ( MiroptTestTools {
513
512
path: "src/tools/miropt-test-tools" ,
514
- mode: |_builder| Mode :: ToolBootstrap
513
+ mode: Mode :: ToolBootstrap
515
514
} ) ;
516
515
// We want to test the local std
517
516
tool_check_step ! ( TestFloatParse {
518
517
path: "src/tools/test-float-parse" ,
519
- mode: |_builder| Mode :: ToolStd ,
518
+ mode: Mode :: ToolStd ,
520
519
allow_features: tool:: TestFloatParse :: ALLOW_FEATURES
521
520
} ) ;
522
521
tool_check_step ! ( FeaturesStatusDump {
523
522
path: "src/tools/features-status-dump" ,
524
- mode: |_builder| Mode :: ToolBootstrap
523
+ mode: Mode :: ToolBootstrap
525
524
} ) ;
526
525
527
- tool_check_step ! ( Bootstrap {
528
- path: "src/bootstrap" ,
529
- mode: |_builder| Mode :: ToolBootstrap ,
530
- default : false
531
- } ) ;
526
+ tool_check_step ! ( Bootstrap { path: "src/bootstrap" , mode: Mode :: ToolBootstrap , default : false } ) ;
532
527
533
528
// `run-make-support` will be built as part of suitable run-make compiletest test steps, but support
534
529
// check to make it easier to work on.
535
530
tool_check_step ! ( RunMakeSupport {
536
531
path: "src/tools/run-make-support" ,
537
- mode: |_builder| Mode :: ToolBootstrap ,
532
+ mode: Mode :: ToolBootstrap ,
538
533
default : false
539
534
} ) ;
540
535
541
536
tool_check_step ! ( CoverageDump {
542
537
path: "src/tools/coverage-dump" ,
543
- mode: |_builder| Mode :: ToolBootstrap ,
538
+ mode: Mode :: ToolBootstrap ,
544
539
default : false
545
540
} ) ;
546
541
547
542
// Compiletest is implicitly "checked" when it gets built in order to run tests,
548
543
// so this is mainly for people working on compiletest to run locally.
549
544
tool_check_step ! ( Compiletest {
550
545
path: "src/tools/compiletest" ,
551
- mode: |builder: & Builder <' _>| if builder. config. compiletest_use_stage0_libtest {
552
- Mode :: ToolBootstrap
553
- } else {
554
- Mode :: ToolStd
555
- } ,
546
+ // Note: compiletest currently still depends on `#![feature(internal_output_capture)]`, so
547
+ // should be considered a `ToolStd` tool for robustness, as it is *possible* for that internal
548
+ // library feature to be changed.
549
+ mode: Mode :: ToolStd ,
556
550
allow_features: COMPILETEST_ALLOW_FEATURES ,
557
551
default : false ,
558
552
} ) ;
0 commit comments