diff options
| author | bjorn3 <bjorn3@users.noreply.github.com> | 2021-08-30 14:36:24 +0200 |
|---|---|---|
| committer | bjorn3 <bjorn3@users.noreply.github.com> | 2021-09-02 12:29:11 +0200 |
| commit | 5464b2e713d5366b3aec5c6eebbe1b84a782c51e (patch) | |
| tree | eb682be717041546c5bd7156d23f4b28cf748ebe | |
| parent | b27ccbc7e1e6a04d749e244a3c13f72ca38e80e7 (diff) | |
| download | rust-5464b2e713d5366b3aec5c6eebbe1b84a782c51e.tar.gz rust-5464b2e713d5366b3aec5c6eebbe1b84a782c51e.zip | |
Remove optimization_fuel_crate from 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 18b93395587..89fa0d6dd99 100644 --- a/compiler/rustc_session/src/session.rs +++ b/compiler/rustc_session/src/session.rs @@ -170,9 +170,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>, @@ -890,7 +887,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(c) = self.opts.debugging_opts.fuel.as_ref().map(|i| &i.0) { if c == crate_name { assert_eq!(self.threads(), 1); let mut fuel = self.optimization_fuel.lock(); @@ -1261,7 +1258,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, @@ -1314,7 +1310,6 @@ pub fn build_session( normalize_projection_ty: AtomicUsize::new(0), }, code_stats: Default::default(), - optimization_fuel_crate, optimization_fuel, print_fuel_crate, print_fuel, |
