Skip to content

Commit e33daf0

Browse files
committed
fix "still mutable" ice while metrics are enabled
1 parent e643f59 commit e33daf0

File tree

1 file changed

+4
-4
lines changed
  • compiler/rustc_driver_impl/src

1 file changed

+4
-4
lines changed

compiler/rustc_driver_impl/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -348,10 +348,6 @@ pub fn run_compiler(at_args: &[String], callbacks: &mut (dyn Callbacks + Send))
348348
// Make sure name resolution and macro expansion is run.
349349
let _ = tcx.resolver_for_lowering();
350350

351-
if let Some(metrics_dir) = &sess.opts.unstable_opts.metrics_dir {
352-
dump_feature_usage_metrics(tcx, metrics_dir);
353-
}
354-
355351
if callbacks.after_expansion(compiler, tcx) == Compilation::Stop {
356352
return early_exit();
357353
}
@@ -370,6 +366,10 @@ pub fn run_compiler(at_args: &[String], callbacks: &mut (dyn Callbacks + Send))
370366

371367
tcx.ensure_ok().analysis(());
372368

369+
if let Some(metrics_dir) = &sess.opts.unstable_opts.metrics_dir {
370+
dump_feature_usage_metrics(tcx, metrics_dir);
371+
}
372+
373373
if callbacks.after_analysis(compiler, tcx) == Compilation::Stop {
374374
return early_exit();
375375
}

0 commit comments

Comments
 (0)