diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2021-10-01 09:18:18 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-01 09:18:18 -0700 |
| commit | 2f67063fbe7ab6bc0793046ecb2c0626531ad451 (patch) | |
| tree | f4f7a1e6636e33439a5039f0e5f13a9daad35d19 /compiler/rustc_session | |
| parent | 1708219940806d3620fb1cc10a0a673f7bfbbe45 (diff) | |
| parent | 42e9dfd75d293e5051c0204eacd773e1453e3365 (diff) | |
| download | rust-2f67063fbe7ab6bc0793046ecb2c0626531ad451.tar.gz rust-2f67063fbe7ab6bc0793046ecb2c0626531ad451.zip | |
Rollup merge of #89322 - tmiasko:rm-optimization-fuel, r=michaelwoerister
Reapply "Remove optimization_fuel_crate from Session"
Diffstat (limited to 'compiler/rustc_session')
| -rw-r--r-- | compiler/rustc_session/src/session.rs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/compiler/rustc_session/src/session.rs b/compiler/rustc_session/src/session.rs index 87f91901141..fbcc3bf2c48 100644 --- a/compiler/rustc_session/src/session.rs +++ b/compiler/rustc_session/src/session.rs @@ -162,9 +162,6 @@ pub struct Session { /// Data about code being compiled, gathered during compilation. pub code_stats: CodeStats, - /// If `-zfuel=crate=n` is specified, `Some(crate)`. - optimization_fuel_crate: Option<String>, - /// Tracks fuel info if `-zfuel=crate=n` is specified. optimization_fuel: Lock<OptimizationFuel>, @@ -882,7 +879,7 @@ impl Session { /// This expends fuel if applicable, and records fuel if applicable. pub fn consider_optimizing<T: Fn() -> String>(&self, crate_name: &str, msg: T) -> bool { let mut ret = true; - if let Some(ref c) = self.optimization_fuel_crate { + if let Some((ref c, _)) = self.opts.debugging_opts.fuel { if c == crate_name { assert_eq!(self.threads(), 1); let mut fuel = self.optimization_fuel.lock(); @@ -1260,7 +1257,6 @@ pub fn build_session( let local_crate_source_file = local_crate_source_file.map(|path| file_path_mapping.map_prefix(path).0); - let optimization_fuel_crate = sopts.debugging_opts.fuel.as_ref().map(|i| i.0.clone()); let optimization_fuel = Lock::new(OptimizationFuel { remaining: sopts.debugging_opts.fuel.as_ref().map_or(0, |i| i.1), out_of_fuel: false, @@ -1311,7 +1307,6 @@ pub fn build_session( normalize_projection_ty: AtomicUsize::new(0), }, code_stats: Default::default(), - optimization_fuel_crate, optimization_fuel, print_fuel, jobserver: jobserver::client(), |
