@@ -654,7 +654,7 @@ macro_rules! tool_check_step {
654654 // The part of this path after the final '/' is also used as a display name.
655655 path: $path: literal
656656 $( , alt_path: $alt_path: literal ) *
657- // Closure that returns `Mode` based on the passed `&Builder<'_>`
657+ // `Mode` to use when checking this tool
658658 , mode: $mode: expr
659659 // Subset of nightly features that are allowed to be used when checking
660660 $( , allow_features: $allow_features: expr ) ?
@@ -682,8 +682,7 @@ macro_rules! tool_check_step {
682682
683683 fn make_run( run: RunConfig <' _>) {
684684 let target = run. target;
685- let builder = run. builder;
686- let mode = $mode( builder) ;
685+ let mode: Mode = $mode;
687686
688687 let compiler = prepare_compiler_for_check( run. builder, target, mode) ;
689688
@@ -704,7 +703,7 @@ macro_rules! tool_check_step {
704703 _value
705704 } ;
706705 let extra_features: & [ & str ] = & [ $( $( $enable_features) ,* ) ?] ;
707- let mode = $mode( builder ) ;
706+ let mode: Mode = $mode;
708707 run_tool_check_step( builder, compiler, target, $path, mode, allow_features, extra_features) ;
709708 }
710709
@@ -767,76 +766,69 @@ fn run_tool_check_step(
767766tool_check_step ! ( Rustdoc {
768767 path: "src/tools/rustdoc" ,
769768 alt_path: "src/librustdoc" ,
770- mode: |_builder| Mode :: ToolRustcPrivate
769+ mode: Mode :: ToolRustcPrivate
771770} ) ;
772771// Clippy, miri and Rustfmt are hybrids. They are external tools, but use a git subtree instead
773772// of a submodule. Since the SourceType only drives the deny-warnings
774773// behavior, treat it as in-tree so that any new warnings in clippy will be
775774// rejected.
776- tool_check_step ! ( Clippy { path: "src/tools/clippy" , mode: |_builder| Mode :: ToolRustcPrivate } ) ;
777- tool_check_step ! ( Miri { path: "src/tools/miri" , mode: |_builder| Mode :: ToolRustcPrivate } ) ;
778- tool_check_step ! ( CargoMiri {
779- path: "src/tools/miri/cargo-miri" ,
780- mode: |_builder| Mode :: ToolRustcPrivate
781- } ) ;
782- tool_check_step ! ( Rustfmt { path: "src/tools/rustfmt" , mode: |_builder| Mode :: ToolRustcPrivate } ) ;
775+ tool_check_step ! ( Clippy { path: "src/tools/clippy" , mode: Mode :: ToolRustcPrivate } ) ;
776+ tool_check_step ! ( Miri { path: "src/tools/miri" , mode: Mode :: ToolRustcPrivate } ) ;
777+ tool_check_step ! ( CargoMiri { path: "src/tools/miri/cargo-miri" , mode: Mode :: ToolRustcPrivate } ) ;
778+ tool_check_step ! ( Rustfmt { path: "src/tools/rustfmt" , mode: Mode :: ToolRustcPrivate } ) ;
783779tool_check_step ! ( RustAnalyzer {
784780 path: "src/tools/rust-analyzer" ,
785- mode: |_builder| Mode :: ToolRustcPrivate ,
781+ mode: Mode :: ToolRustcPrivate ,
786782 allow_features: tool:: RustAnalyzer :: ALLOW_FEATURES ,
787783 enable_features: [ "in-rust-tree" ] ,
788784} ) ;
789785tool_check_step ! ( MiroptTestTools {
790786 path: "src/tools/miropt-test-tools" ,
791- mode: |_builder| Mode :: ToolBootstrap
787+ mode: Mode :: ToolBootstrap
792788} ) ;
793789// We want to test the local std
794790tool_check_step ! ( TestFloatParse {
795791 path: "src/tools/test-float-parse" ,
796- mode: |_builder| Mode :: ToolStd ,
792+ mode: Mode :: ToolStd ,
797793 allow_features: TEST_FLOAT_PARSE_ALLOW_FEATURES
798794} ) ;
799795tool_check_step ! ( FeaturesStatusDump {
800796 path: "src/tools/features-status-dump" ,
801- mode: |_builder| Mode :: ToolBootstrap
797+ mode: Mode :: ToolBootstrap
802798} ) ;
803799
804- tool_check_step ! ( Bootstrap {
805- path: "src/bootstrap" ,
806- mode: |_builder| Mode :: ToolBootstrap ,
807- default : false
808- } ) ;
800+ tool_check_step ! ( Bootstrap { path: "src/bootstrap" , mode: Mode :: ToolBootstrap , default : false } ) ;
809801
810802// `run-make-support` will be built as part of suitable run-make compiletest test steps, but support
811803// check to make it easier to work on.
812804tool_check_step ! ( RunMakeSupport {
813805 path: "src/tools/run-make-support" ,
814- mode: |_builder| Mode :: ToolBootstrap ,
806+ mode: Mode :: ToolBootstrap ,
815807 default : false
816808} ) ;
817809
818810tool_check_step ! ( CoverageDump {
819811 path: "src/tools/coverage-dump" ,
820- mode: |_builder| Mode :: ToolBootstrap ,
812+ mode: Mode :: ToolBootstrap ,
821813 default : false
822814} ) ;
823815
824816// Compiletest is implicitly "checked" when it gets built in order to run tests,
825817// so this is mainly for people working on compiletest to run locally.
826818tool_check_step ! ( Compiletest {
827819 path: "src/tools/compiletest" ,
828- mode: |_builder| Mode :: ToolBootstrap ,
820+ mode: Mode :: ToolBootstrap ,
829821 default : false ,
830822} ) ;
831823
832824tool_check_step ! ( Linkchecker {
833825 path: "src/tools/linkchecker" ,
834- mode: |_builder| Mode :: ToolBootstrap ,
826+ mode: Mode :: ToolBootstrap ,
835827 default : false
836828} ) ;
837829
838830tool_check_step ! ( BumpStage0 {
839831 path: "src/tools/bump-stage0" ,
840- mode: |_builder| Mode :: ToolBootstrap ,
832+ mode: Mode :: ToolBootstrap ,
841833 default : false
842834} ) ;
0 commit comments