@@ -859,9 +859,6 @@ impl Config {
859
859
set ( & mut config. full_bootstrap , build. full_bootstrap ) ;
860
860
set ( & mut config. extended , build. extended ) ;
861
861
config. tools = build. tools ;
862
- if build. rustfmt . is_some ( ) {
863
- config. initial_rustfmt = build. rustfmt ;
864
- }
865
862
set ( & mut config. verbose , build. verbose ) ;
866
863
set ( & mut config. sanitizers , build. sanitizers ) ;
867
864
set ( & mut config. profiler , build. profiler ) ;
@@ -1154,17 +1151,12 @@ impl Config {
1154
1151
set ( & mut config. missing_tools , t. missing_tools ) ;
1155
1152
}
1156
1153
1157
- config. initial_rustfmt = config. initial_rustfmt . or_else ( {
1158
- let build = config. build ;
1159
- let initial_rustc = & config. initial_rustc ;
1160
-
1161
- move || {
1162
- // Cargo does not provide a RUSTFMT environment variable, so we
1163
- // synthesize it manually.
1164
- let rustfmt = initial_rustc. with_file_name ( exe ( "rustfmt" , build) ) ;
1154
+ config. initial_rustfmt = build. rustfmt . or_else ( || {
1155
+ // Cargo does not provide a RUSTFMT environment variable, so we
1156
+ // synthesize it manually.
1157
+ let rustfmt = config. initial_rustc . with_file_name ( exe ( "rustfmt" , config. build ) ) ;
1165
1158
1166
- if rustfmt. exists ( ) { Some ( rustfmt) } else { None }
1167
- }
1159
+ if rustfmt. exists ( ) { Some ( rustfmt) } else { None }
1168
1160
} ) ;
1169
1161
1170
1162
// Now that we've reached the end of our configuration, infer the
0 commit comments