@@ -654,7 +654,7 @@ macro_rules! tool_check_step {
654
654
// The part of this path after the final '/' is also used as a display name.
655
655
path: $path: literal
656
656
$( , alt_path: $alt_path: literal ) *
657
- // Closure that returns `Mode` based on the passed `&Builder<'_>`
657
+ // `Mode` to use when checking this tool
658
658
, mode: $mode: expr
659
659
// Subset of nightly features that are allowed to be used when checking
660
660
$( , allow_features: $allow_features: expr ) ?
@@ -682,8 +682,7 @@ macro_rules! tool_check_step {
682
682
683
683
fn make_run( run: RunConfig <' _>) {
684
684
let target = run. target;
685
- let builder = run. builder;
686
- let mode = $mode( builder) ;
685
+ let mode: Mode = $mode;
687
686
688
687
let compiler = prepare_compiler_for_check( run. builder, target, mode) ;
689
688
@@ -704,7 +703,7 @@ macro_rules! tool_check_step {
704
703
_value
705
704
} ;
706
705
let extra_features: & [ & str ] = & [ $( $( $enable_features) ,* ) ?] ;
707
- let mode = $mode( builder ) ;
706
+ let mode: Mode = $mode;
708
707
run_tool_check_step( builder, compiler, target, $path, mode, allow_features, extra_features) ;
709
708
}
710
709
@@ -767,76 +766,69 @@ fn run_tool_check_step(
767
766
tool_check_step ! ( Rustdoc {
768
767
path: "src/tools/rustdoc" ,
769
768
alt_path: "src/librustdoc" ,
770
- mode: |_builder| Mode :: ToolRustcPrivate
769
+ mode: Mode :: ToolRustcPrivate
771
770
} ) ;
772
771
// Clippy, miri and Rustfmt are hybrids. They are external tools, but use a git subtree instead
773
772
// of a submodule. Since the SourceType only drives the deny-warnings
774
773
// behavior, treat it as in-tree so that any new warnings in clippy will be
775
774
// 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 } ) ;
783
779
tool_check_step ! ( RustAnalyzer {
784
780
path: "src/tools/rust-analyzer" ,
785
- mode: |_builder| Mode :: ToolRustcPrivate ,
781
+ mode: Mode :: ToolRustcPrivate ,
786
782
allow_features: tool:: RustAnalyzer :: ALLOW_FEATURES ,
787
783
enable_features: [ "in-rust-tree" ] ,
788
784
} ) ;
789
785
tool_check_step ! ( MiroptTestTools {
790
786
path: "src/tools/miropt-test-tools" ,
791
- mode: |_builder| Mode :: ToolBootstrap
787
+ mode: Mode :: ToolBootstrap
792
788
} ) ;
793
789
// We want to test the local std
794
790
tool_check_step ! ( TestFloatParse {
795
791
path: "src/tools/test-float-parse" ,
796
- mode: |_builder| Mode :: ToolStd ,
792
+ mode: Mode :: ToolStd ,
797
793
allow_features: TEST_FLOAT_PARSE_ALLOW_FEATURES
798
794
} ) ;
799
795
tool_check_step ! ( FeaturesStatusDump {
800
796
path: "src/tools/features-status-dump" ,
801
- mode: |_builder| Mode :: ToolBootstrap
797
+ mode: Mode :: ToolBootstrap
802
798
} ) ;
803
799
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 } ) ;
809
801
810
802
// `run-make-support` will be built as part of suitable run-make compiletest test steps, but support
811
803
// check to make it easier to work on.
812
804
tool_check_step ! ( RunMakeSupport {
813
805
path: "src/tools/run-make-support" ,
814
- mode: |_builder| Mode :: ToolBootstrap ,
806
+ mode: Mode :: ToolBootstrap ,
815
807
default : false
816
808
} ) ;
817
809
818
810
tool_check_step ! ( CoverageDump {
819
811
path: "src/tools/coverage-dump" ,
820
- mode: |_builder| Mode :: ToolBootstrap ,
812
+ mode: Mode :: ToolBootstrap ,
821
813
default : false
822
814
} ) ;
823
815
824
816
// Compiletest is implicitly "checked" when it gets built in order to run tests,
825
817
// so this is mainly for people working on compiletest to run locally.
826
818
tool_check_step ! ( Compiletest {
827
819
path: "src/tools/compiletest" ,
828
- mode: |_builder| Mode :: ToolBootstrap ,
820
+ mode: Mode :: ToolBootstrap ,
829
821
default : false ,
830
822
} ) ;
831
823
832
824
tool_check_step ! ( Linkchecker {
833
825
path: "src/tools/linkchecker" ,
834
- mode: |_builder| Mode :: ToolBootstrap ,
826
+ mode: Mode :: ToolBootstrap ,
835
827
default : false
836
828
} ) ;
837
829
838
830
tool_check_step ! ( BumpStage0 {
839
831
path: "src/tools/bump-stage0" ,
840
- mode: |_builder| Mode :: ToolBootstrap ,
832
+ mode: Mode :: ToolBootstrap ,
841
833
default : false
842
834
} ) ;
0 commit comments