@@ -170,9 +170,6 @@ pub struct Session {
170
170
/// Data about code being compiled, gathered during compilation.
171
171
pub code_stats : CodeStats ,
172
172
173
- /// If `-zfuel=crate=n` is specified, `Some(crate)`.
174
- optimization_fuel_crate : Option < String > ,
175
-
176
173
/// Tracks fuel info if `-zfuel=crate=n` is specified.
177
174
optimization_fuel : Lock < OptimizationFuel > ,
178
175
@@ -890,7 +887,7 @@ impl Session {
890
887
/// This expends fuel if applicable, and records fuel if applicable.
891
888
pub fn consider_optimizing < T : Fn ( ) -> String > ( & self , crate_name : & str , msg : T ) -> bool {
892
889
let mut ret = true ;
893
- if let Some ( ref c) = self . optimization_fuel_crate {
890
+ if let Some ( c) = self . opts . debugging_opts . fuel . as_ref ( ) . map ( |i| & i . 0 ) {
894
891
if c == crate_name {
895
892
assert_eq ! ( self . threads( ) , 1 ) ;
896
893
let mut fuel = self . optimization_fuel . lock ( ) ;
@@ -1261,7 +1258,6 @@ pub fn build_session(
1261
1258
let local_crate_source_file =
1262
1259
local_crate_source_file. map ( |path| file_path_mapping. map_prefix ( path) . 0 ) ;
1263
1260
1264
- let optimization_fuel_crate = sopts. debugging_opts . fuel . as_ref ( ) . map ( |i| i. 0 . clone ( ) ) ;
1265
1261
let optimization_fuel = Lock :: new ( OptimizationFuel {
1266
1262
remaining : sopts. debugging_opts . fuel . as_ref ( ) . map_or ( 0 , |i| i. 1 ) ,
1267
1263
out_of_fuel : false ,
@@ -1314,7 +1310,6 @@ pub fn build_session(
1314
1310
normalize_projection_ty : AtomicUsize :: new ( 0 ) ,
1315
1311
} ,
1316
1312
code_stats : Default :: default ( ) ,
1317
- optimization_fuel_crate,
1318
1313
optimization_fuel,
1319
1314
print_fuel_crate,
1320
1315
print_fuel,
0 commit comments