about summary refs log tree commit diff
path: root/compiler/rustc_interface/src
diff options
context:
space:
mode:
authorbjorn3 <17426603+bjorn3@users.noreply.github.com>2023-11-04 16:06:23 +0000
committerbjorn3 <17426603+bjorn3@users.noreply.github.com>2023-11-26 18:02:47 +0000
commit7ede8e2a5912778ce01b6a520c954c4e105126e6 (patch)
tree9f43514fa2d6867f0f5494d1638162940dde5c61 /compiler/rustc_interface/src
parent4acaa0284ef1354f3310d7de0147ea4a371b4389 (diff)
downloadrust-7ede8e2a5912778ce01b6a520c954c4e105126e6.tar.gz
rust-7ede8e2a5912778ce01b6a520c954c4e105126e6.zip
Ensure macro expansion runs before writing the dep info
Diffstat (limited to 'compiler/rustc_interface/src')
-rw-r--r--compiler/rustc_interface/src/passes.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_interface/src/passes.rs b/compiler/rustc_interface/src/passes.rs
index d1270427967..6af97910b49 100644
--- a/compiler/rustc_interface/src/passes.rs
+++ b/compiler/rustc_interface/src/passes.rs
@@ -554,6 +554,11 @@ fn resolver_for_lowering<'tcx>(
 }
 
 fn write_dep_info(tcx: TyCtxt<'_>, (): ()) {
+    // Make sure name resolution and macro expansion is run for
+    // the side-effect of providing a complete set of all
+    // accessed files and env vars.
+    let _ = tcx.resolver_for_lowering(());
+
     let sess = tcx.sess;
     let _timer = sess.timer("write_dep_info");
     let crate_name = tcx.crate_name(LOCAL_CRATE);