Skip to content

Commit f032cba

Browse files
committed
Auto merge of #75575 - marmeladema:only-measure-drop-ast, r=eddyb
Only measure time spent dropping the AST r? @eddyb
2 parents 9b88e0a + a1dfa0f commit f032cba

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/librustc_driver/lib.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -348,8 +348,10 @@ pub fn run_compiler(
348348
queries.global_ctxt()?;
349349

350350
// Drop AST after creating GlobalCtxt to free memory
351-
let _timer = sess.prof.generic_activity("drop_ast");
352-
mem::drop(queries.expansion()?.take());
351+
{
352+
let _timer = sess.prof.generic_activity("drop_ast");
353+
mem::drop(queries.expansion()?.take());
354+
}
353355

354356
if sess.opts.debugging_opts.no_analysis || sess.opts.debugging_opts.ast_json {
355357
return early_exit();

0 commit comments

Comments
 (0)