@@ -376,7 +376,7 @@ macro_rules! tool_check_step {
376376 // The part of this path after the final '/' is also used as a display name.
377377 path: $path: literal
378378 $( , 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?
380380 , mode: $mode: expr
381381 // Subset of nightly features that are allowed to be used when checking
382382 $( , allow_features: $allow_features: expr ) ?
@@ -404,8 +404,7 @@ macro_rules! tool_check_step {
404404
405405 fn make_run( run: RunConfig <' _>) {
406406 let target = run. target;
407- let builder = run. builder;
408- let mode = $mode( builder) ;
407+ let mode = $mode;
409408
410409 let build_compiler = prepare_compiler_for_check( run. builder, target, mode) ;
411410
@@ -426,7 +425,7 @@ macro_rules! tool_check_step {
426425 _value
427426 } ;
428427 let extra_features: & [ & str ] = & [ $( $( $enable_features) ,* ) ?] ;
429- let mode = $mode( builder ) ;
428+ let mode = $mode;
430429 run_tool_check_step( builder, build_compiler, target, $path, mode, allow_features, extra_features) ;
431430 }
432431
@@ -493,66 +492,61 @@ fn run_tool_check_step(
493492tool_check_step ! ( Rustdoc {
494493 path: "src/tools/rustdoc" ,
495494 alt_path: "src/librustdoc" ,
496- mode: |_builder| Mode :: ToolRustc
495+ mode: Mode :: ToolRustc
497496} ) ;
498497// Clippy, miri and Rustfmt are hybrids. They are external tools, but use a git subtree instead
499498// of a submodule. Since the SourceType only drives the deny-warnings
500499// behavior, treat it as in-tree so that any new warnings in clippy will be
501500// 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 } ) ;
506505tool_check_step ! ( RustAnalyzer {
507506 path: "src/tools/rust-analyzer" ,
508- mode: |_builder| Mode :: ToolRustc ,
507+ mode: Mode :: ToolRustc ,
509508 allow_features: tool:: RustAnalyzer :: ALLOW_FEATURES ,
510509 enable_features: [ "in-rust-tree" ] ,
511510} ) ;
512511tool_check_step ! ( MiroptTestTools {
513512 path: "src/tools/miropt-test-tools" ,
514- mode: |_builder| Mode :: ToolBootstrap
513+ mode: Mode :: ToolBootstrap
515514} ) ;
516515// We want to test the local std
517516tool_check_step ! ( TestFloatParse {
518517 path: "src/tools/test-float-parse" ,
519- mode: |_builder| Mode :: ToolStd ,
518+ mode: Mode :: ToolStd ,
520519 allow_features: tool:: TestFloatParse :: ALLOW_FEATURES
521520} ) ;
522521tool_check_step ! ( FeaturesStatusDump {
523522 path: "src/tools/features-status-dump" ,
524- mode: |_builder| Mode :: ToolBootstrap
523+ mode: Mode :: ToolBootstrap
525524} ) ;
526525
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 } ) ;
532527
533528// `run-make-support` will be built as part of suitable run-make compiletest test steps, but support
534529// check to make it easier to work on.
535530tool_check_step ! ( RunMakeSupport {
536531 path: "src/tools/run-make-support" ,
537- mode: |_builder| Mode :: ToolBootstrap ,
532+ mode: Mode :: ToolBootstrap ,
538533 default : false
539534} ) ;
540535
541536tool_check_step ! ( CoverageDump {
542537 path: "src/tools/coverage-dump" ,
543- mode: |_builder| Mode :: ToolBootstrap ,
538+ mode: Mode :: ToolBootstrap ,
544539 default : false
545540} ) ;
546541
547542// Compiletest is implicitly "checked" when it gets built in order to run tests,
548543// so this is mainly for people working on compiletest to run locally.
549544tool_check_step ! ( Compiletest {
550545 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 ,
556550 allow_features: COMPILETEST_ALLOW_FEATURES ,
557551 default : false ,
558552} ) ;
0 commit comments