Skip to content

Commit 5464b2e

Browse files
committed
Remove optimization_fuel_crate from Session
1 parent b27ccbc commit 5464b2e

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

compiler/rustc_session/src/session.rs

+1-6
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,6 @@ pub struct Session {
170170
/// Data about code being compiled, gathered during compilation.
171171
pub code_stats: CodeStats,
172172

173-
/// If `-zfuel=crate=n` is specified, `Some(crate)`.
174-
optimization_fuel_crate: Option<String>,
175-
176173
/// Tracks fuel info if `-zfuel=crate=n` is specified.
177174
optimization_fuel: Lock<OptimizationFuel>,
178175

@@ -890,7 +887,7 @@ impl Session {
890887
/// This expends fuel if applicable, and records fuel if applicable.
891888
pub fn consider_optimizing<T: Fn() -> String>(&self, crate_name: &str, msg: T) -> bool {
892889
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) {
894891
if c == crate_name {
895892
assert_eq!(self.threads(), 1);
896893
let mut fuel = self.optimization_fuel.lock();
@@ -1261,7 +1258,6 @@ pub fn build_session(
12611258
let local_crate_source_file =
12621259
local_crate_source_file.map(|path| file_path_mapping.map_prefix(path).0);
12631260

1264-
let optimization_fuel_crate = sopts.debugging_opts.fuel.as_ref().map(|i| i.0.clone());
12651261
let optimization_fuel = Lock::new(OptimizationFuel {
12661262
remaining: sopts.debugging_opts.fuel.as_ref().map_or(0, |i| i.1),
12671263
out_of_fuel: false,
@@ -1314,7 +1310,6 @@ pub fn build_session(
13141310
normalize_projection_ty: AtomicUsize::new(0),
13151311
},
13161312
code_stats: Default::default(),
1317-
optimization_fuel_crate,
13181313
optimization_fuel,
13191314
print_fuel_crate,
13201315
print_fuel,

0 commit comments

Comments
 (0)