Minor change
This commit is contained in:
parent
bd2ff518ce
commit
ec2d1b0ed2
1 changed files with 2 additions and 2 deletions
|
@ -210,7 +210,7 @@ impl Compiler {
|
||||||
F: for<'tcx> FnOnce(&'tcx Queries<'tcx>) -> T,
|
F: for<'tcx> FnOnce(&'tcx Queries<'tcx>) -> T,
|
||||||
{
|
{
|
||||||
// Must declare `_timer` first so that it is dropped after `queries`.
|
// Must declare `_timer` first so that it is dropped after `queries`.
|
||||||
let mut _timer = None;
|
let _timer;
|
||||||
let queries = Queries::new(self);
|
let queries = Queries::new(self);
|
||||||
let ret = f(&queries);
|
let ret = f(&queries);
|
||||||
|
|
||||||
|
@ -233,7 +233,7 @@ impl Compiler {
|
||||||
|
|
||||||
// The timer's lifetime spans the dropping of `queries`, which contains
|
// The timer's lifetime spans the dropping of `queries`, which contains
|
||||||
// the global context.
|
// 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() {
|
if let Err((path, error)) = queries.finish() {
|
||||||
self.sess.dcx().emit_fatal(errors::FailedWritingFile { path: &path, error });
|
self.sess.dcx().emit_fatal(errors::FailedWritingFile { path: &path, error });
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue