Skip to content

Commit

Permalink
Minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorn3 committed Jul 1, 2024
1 parent bd2ff51 commit ec2d1b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/rustc_interface/src/queries.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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 });
}
Expand Down

0 comments on commit ec2d1b0

Please sign in to comment.