diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2024-06-30 19:29:25 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2024-07-01 11:00:49 +0000 |
| commit | ec2d1b0ed2f62d0d1da2ce1d5fbffc2eea4ff7b8 (patch) | |
| tree | d4c34cc61284dcb53479b1ad70f7b54cd02d2633 /compiler/rustc_interface/src/queries.rs | |
| parent | bd2ff518cefe1dc9e1dcd328319eead618eed67a (diff) | |
| download | rust-ec2d1b0ed2f62d0d1da2ce1d5fbffc2eea4ff7b8.tar.gz rust-ec2d1b0ed2f62d0d1da2ce1d5fbffc2eea4ff7b8.zip | |
Minor change
Diffstat (limited to 'compiler/rustc_interface/src/queries.rs')
| -rw-r--r-- | compiler/rustc_interface/src/queries.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_interface/src/queries.rs b/compiler/rustc_interface/src/queries.rs index e78576c8e43..370c06c22a7 100644 --- a/compiler/rustc_interface/src/queries.rs +++ b/compiler/rustc_interface/src/queries.rs @@ -210,7 +210,7 @@ impl Compiler { F: for<'tcx> FnOnce(&'tcx Queries<'tcx>) -> T, { // Must declare `_timer` first so that it is dropped after `queries`. - let mut _timer = None; + let _timer; let queries = Queries::new(self); let ret = f(&queries); @@ -233,7 +233,7 @@ impl Compiler { // The timer's lifetime spans the dropping of `queries`, which contains // the global context. - _timer = Some(self.sess.timer("free_global_ctxt")); + _timer = self.sess.timer("free_global_ctxt"); if let Err((path, error)) = queries.finish() { self.sess.dcx().emit_fatal(errors::FailedWritingFile { path: &path, error }); } |
