@@ -1007,7 +1007,7 @@ impl Step for LibcxxVersionTool {
1007
1007
}
1008
1008
1009
1009
macro_rules! tool_extended {
1010
- ( ( $sel : ident , $builder : ident ) ,
1010
+ (
1011
1011
$( $name: ident,
1012
1012
$path: expr,
1013
1013
$tool_name: expr,
@@ -1052,10 +1052,11 @@ macro_rules! tool_extended {
1052
1052
}
1053
1053
1054
1054
#[ allow( unused_mut) ]
1055
- fn run( mut $sel, $builder: & Builder <' _>) -> PathBuf {
1056
- let tool = $builder. ensure( ToolBuild {
1057
- compiler: $sel. compiler,
1058
- target: $sel. target,
1055
+ fn run( self , builder: & Builder <' _>) -> PathBuf {
1056
+ let Self { compiler, target } = self ;
1057
+ let tool = builder. ensure( ToolBuild {
1058
+ compiler,
1059
+ target,
1059
1060
tool: $tool_name,
1060
1061
mode: Mode :: ToolRustc ,
1061
1062
path: $path,
@@ -1065,21 +1066,21 @@ macro_rules! tool_extended {
1065
1066
cargo_args: vec![ ]
1066
1067
} ) ;
1067
1068
1068
- if ( false $( || !$add_bins_to_sysroot. is_empty( ) ) ?) && $sel . compiler. stage > 0 {
1069
- let bindir = $ builder. sysroot( $sel . compiler) . join( "bin" ) ;
1069
+ if ( false $( || !$add_bins_to_sysroot. is_empty( ) ) ?) && compiler. stage > 0 {
1070
+ let bindir = builder. sysroot( compiler) . join( "bin" ) ;
1070
1071
t!( fs:: create_dir_all( & bindir) ) ;
1071
1072
1072
1073
#[ allow( unused_variables) ]
1073
- let tools_out = $ builder
1074
- . cargo_out( $sel . compiler, Mode :: ToolRustc , $sel . target) ;
1074
+ let tools_out = builder
1075
+ . cargo_out( compiler, Mode :: ToolRustc , target) ;
1075
1076
1076
1077
$( for add_bin in $add_bins_to_sysroot {
1077
- let bin_source = tools_out. join( exe( add_bin, $sel . target) ) ;
1078
- let bin_destination = bindir. join( exe( add_bin, $sel . compiler. host) ) ;
1079
- $ builder. copy_link( & bin_source, & bin_destination) ;
1078
+ let bin_source = tools_out. join( exe( add_bin, target) ) ;
1079
+ let bin_destination = bindir. join( exe( add_bin, compiler. host) ) ;
1080
+ builder. copy_link( & bin_source, & bin_destination) ;
1080
1081
} ) ?
1081
1082
1082
- let tool = bindir. join( exe( $tool_name, $sel . compiler. host) ) ;
1083
+ let tool = bindir. join( exe( $tool_name, compiler. host) ) ;
1083
1084
tool
1084
1085
} else {
1085
1086
tool
@@ -1090,7 +1091,7 @@ macro_rules! tool_extended {
1090
1091
}
1091
1092
}
1092
1093
1093
- tool_extended ! ( ( self , builder ) ,
1094
+ tool_extended ! (
1094
1095
Cargofmt , "src/tools/rustfmt" , "cargo-fmt" , stable=true ;
1095
1096
CargoClippy , "src/tools/clippy" , "cargo-clippy" , stable=true ;
1096
1097
Clippy , "src/tools/clippy" , "clippy-driver" , stable=true , add_bins_to_sysroot = [ "clippy-driver" , "cargo-clippy" ] ;
0 commit comments