@@ -169,9 +169,6 @@ pub struct Session {
169
169
/// Data about code being compiled, gathered during compilation.
170
170
pub code_stats: CodeStats,
171
171
172
- /// If `-zfuel=crate=n` is specified, `Some(crate)`.
173
- optimization_fuel_crate: Option<String>,
174
-
175
172
/// Tracks fuel info if `-zfuel=crate=n` is specified.
176
173
optimization_fuel: Lock<OptimizationFuel>,
177
174
@@ -896,7 +893,7 @@ impl Session {
896
893
/// This expends fuel if applicable, and records fuel if applicable.
897
894
pub fn consider_optimizing<T: Fn() -> String>(&self, crate_name: &str, msg: T) -> bool {
898
895
let mut ret = true;
899
- if let Some(ref c) = self.optimization_fuel_crate {
896
+ if let Some(( ref c, _)) = self.opts.debugging_opts.fuel {
900
897
if c == crate_name {
901
898
assert_eq!(self.threads(), 1);
902
899
let mut fuel = self.optimization_fuel.lock();
@@ -1274,7 +1271,6 @@ pub fn build_session(
1274
1271
let local_crate_source_file =
1275
1272
local_crate_source_file.map(|path| file_path_mapping.map_prefix(path).0);
1276
1273
1277
- let optimization_fuel_crate = sopts.debugging_opts.fuel.as_ref().map(|i| i.0.clone());
1278
1274
let optimization_fuel = Lock::new(OptimizationFuel {
1279
1275
remaining: sopts.debugging_opts.fuel.as_ref().map_or(0, |i| i.1),
1280
1276
out_of_fuel: false,
@@ -1326,7 +1322,6 @@ pub fn build_session(
1326
1322
normalize_projection_ty: AtomicUsize::new(0),
1327
1323
},
1328
1324
code_stats: Default::default(),
1329
- optimization_fuel_crate,
1330
1325
optimization_fuel,
1331
1326
print_fuel,
1332
1327
jobserver: jobserver::client(),
0 commit comments