about summary refs log tree commit diff
path: root/compiler/rustc_driver_impl/src
diff options
context:
space:
mode:
authorJane Losare-Lusby <jlusby@yaah.dev>2025-04-07 14:26:14 -0700
committerJane Losare-Lusby <jlusby@yaah.dev>2025-04-08 15:00:37 -0700
commit6f5501583557d2d918cd42fab3f99ad153152afd (patch)
treebd57a566c4c84e2d4632a34e5588d40dff7c5dbf /compiler/rustc_driver_impl/src
parente643f59f6da3a84f43e75dea99afaa5b041ea6bf (diff)
downloadrust-6f5501583557d2d918cd42fab3f99ad153152afd.tar.gz
rust-6f5501583557d2d918cd42fab3f99ad153152afd.zip
fix "still mutable" ice while metrics are enabled
Diffstat (limited to 'compiler/rustc_driver_impl/src')
-rw-r--r--compiler/rustc_driver_impl/src/lib.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_driver_impl/src/lib.rs b/compiler/rustc_driver_impl/src/lib.rs
index 595ac1edd28..bbc18c371ea 100644
--- a/compiler/rustc_driver_impl/src/lib.rs
+++ b/compiler/rustc_driver_impl/src/lib.rs
@@ -348,10 +348,6 @@ pub fn run_compiler(at_args: &[String], callbacks: &mut (dyn Callbacks + Send))
             // Make sure name resolution and macro expansion is run.
             let _ = tcx.resolver_for_lowering();
 
-            if let Some(metrics_dir) = &sess.opts.unstable_opts.metrics_dir {
-                dump_feature_usage_metrics(tcx, metrics_dir);
-            }
-
             if callbacks.after_expansion(compiler, tcx) == Compilation::Stop {
                 return early_exit();
             }
@@ -370,6 +366,10 @@ pub fn run_compiler(at_args: &[String], callbacks: &mut (dyn Callbacks + Send))
 
             tcx.ensure_ok().analysis(());
 
+            if let Some(metrics_dir) = &sess.opts.unstable_opts.metrics_dir {
+                dump_feature_usage_metrics(tcx, metrics_dir);
+            }
+
             if callbacks.after_analysis(compiler, tcx) == Compilation::Stop {
                 return early_exit();
             }