diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2023-11-21 23:40:23 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2023-11-28 15:39:31 +0300 |
| commit | f0dc9063196d56b43c56b04c9f94aa416c83bbd5 (patch) | |
| tree | 88a056727ff501c64658f524bb4aee41adc7a679 /compiler/rustc_interface/src/queries.rs | |
| parent | 46a24ed2f4b4bdfccca36fb20b1574a6164893d8 (diff) | |
| download | rust-f0dc9063196d56b43c56b04c9f94aa416c83bbd5.tar.gz rust-f0dc9063196d56b43c56b04c9f94aa416c83bbd5.zip | |
resolve: Feed the `def_kind` query immediately on `DefId` creation
Diffstat (limited to 'compiler/rustc_interface/src/queries.rs')
| -rw-r--r-- | compiler/rustc_interface/src/queries.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_interface/src/queries.rs b/compiler/rustc_interface/src/queries.rs index b7cd5468a00..e81c3f42a16 100644 --- a/compiler/rustc_interface/src/queries.rs +++ b/compiler/rustc_interface/src/queries.rs @@ -8,6 +8,7 @@ use rustc_codegen_ssa::CodegenResults; use rustc_data_structures::steal::Steal; use rustc_data_structures::svh::Svh; use rustc_data_structures::sync::{AppendOnlyIndexVec, FreezeLock, OnceLock, WorkerLocal}; +use rustc_hir::def::DefKind; use rustc_hir::def_id::{StableCrateId, CRATE_DEF_ID, LOCAL_CRATE}; use rustc_hir::definitions::Definitions; use rustc_incremental::setup_dep_graph; @@ -171,6 +172,9 @@ impl<'tcx> Queries<'tcx> { ))); feed.crate_for_resolver(tcx.arena.alloc(Steal::new((krate, pre_configured_attrs)))); feed.output_filenames(Arc::new(outputs)); + + let feed = tcx.feed_local_def_id(CRATE_DEF_ID); + feed.def_kind(DefKind::Mod); }); Ok(qcx) }) |
