@@ -162,9 +162,6 @@ pub struct Session {
162
162
/// Data about code being compiled, gathered during compilation.
163
163
pub code_stats : CodeStats ,
164
164
165
- /// If `-zfuel=crate=n` is specified, `Some(crate)`.
166
- optimization_fuel_crate : Option < String > ,
167
-
168
165
/// Tracks fuel info if `-zfuel=crate=n` is specified.
169
166
optimization_fuel : Lock < OptimizationFuel > ,
170
167
@@ -882,7 +879,7 @@ impl Session {
882
879
/// This expends fuel if applicable, and records fuel if applicable.
883
880
pub fn consider_optimizing < T : Fn ( ) -> String > ( & self , crate_name : & str , msg : T ) -> bool {
884
881
let mut ret = true ;
885
- if let Some ( ref c) = self . optimization_fuel_crate {
882
+ if let Some ( ( ref c, _ ) ) = self . opts . debugging_opts . fuel {
886
883
if c == crate_name {
887
884
assert_eq ! ( self . threads( ) , 1 ) ;
888
885
let mut fuel = self . optimization_fuel . lock ( ) ;
@@ -1260,7 +1257,6 @@ pub fn build_session(
1260
1257
let local_crate_source_file =
1261
1258
local_crate_source_file. map ( |path| file_path_mapping. map_prefix ( path) . 0 ) ;
1262
1259
1263
- let optimization_fuel_crate = sopts. debugging_opts . fuel . as_ref ( ) . map ( |i| i. 0 . clone ( ) ) ;
1264
1260
let optimization_fuel = Lock :: new ( OptimizationFuel {
1265
1261
remaining : sopts. debugging_opts . fuel . as_ref ( ) . map_or ( 0 , |i| i. 1 ) ,
1266
1262
out_of_fuel : false ,
@@ -1311,7 +1307,6 @@ pub fn build_session(
1311
1307
normalize_projection_ty : AtomicUsize :: new ( 0 ) ,
1312
1308
} ,
1313
1309
code_stats : Default :: default ( ) ,
1314
- optimization_fuel_crate,
1315
1310
optimization_fuel,
1316
1311
print_fuel,
1317
1312
jobserver : jobserver:: client ( ) ,
0 commit comments