Minor change

This commit is contained in:
bjorn3 2024-06-30 19:29:25 +00:00
parent bd2ff518ce
commit ec2d1b0ed2

View File

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