about summary refs log tree commit diff
path: root/compiler/rustc_session/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-04-09 03:04:20 +0000
committerbors <bors@rust-lang.org>2024-04-09 03:04:20 +0000
commitbd12986fd6659a3091cff7694b8225374f4a26fe (patch)
treefda34a81cf890b5de2ed80c69cb672d3c67ca149 /compiler/rustc_session/src
parent59c808fcd9eeb3c5528209d1cef3aaa5521edbd6 (diff)
parent24fc6e96d6acd8ee75023f1a91893df441911fc3 (diff)
downloadrust-bd12986fd6659a3091cff7694b8225374f4a26fe.tar.gz
rust-bd12986fd6659a3091cff7694b8225374f4a26fe.zip
Auto merge of #123099 - oli-obk:span_tcx, r=petrochenkov
Replace some `CrateStore` trait methods with hooks.

Just like with the `CrateStore` trait, this avoids the cyclic definition issues with `CStore` being
defined after TyCtxt, but needing to be used in TyCtxt.
Diffstat (limited to 'compiler/rustc_session/src')
-rw-r--r--compiler/rustc_session/src/cstore.rs18
1 files changed, 0 insertions, 18 deletions
diff --git a/compiler/rustc_session/src/cstore.rs b/compiler/rustc_session/src/cstore.rs
index a0f5eb59b6a..cb6656bae06 100644
--- a/compiler/rustc_session/src/cstore.rs
+++ b/compiler/rustc_session/src/cstore.rs
@@ -4,12 +4,10 @@
 
 use crate::search_paths::PathKind;
 use crate::utils::NativeLibKind;
-use crate::Session;
 use rustc_ast as ast;
 use rustc_data_structures::sync::{self, AppendOnlyIndexVec, FreezeLock};
 use rustc_hir::def_id::{CrateNum, DefId, LocalDefId, StableCrateId, LOCAL_CRATE};
 use rustc_hir::definitions::{DefKey, DefPath, DefPathHash, Definitions};
-use rustc_span::hygiene::{ExpnHash, ExpnId};
 use rustc_span::symbol::Symbol;
 use rustc_span::Span;
 use rustc_target::spec::abi::Abi;
@@ -220,22 +218,6 @@ pub trait CrateStore: std::fmt::Debug {
     fn crate_name(&self, cnum: CrateNum) -> Symbol;
     fn stable_crate_id(&self, cnum: CrateNum) -> StableCrateId;
     fn stable_crate_id_to_crate_num(&self, stable_crate_id: StableCrateId) -> CrateNum;
-
-    /// Fetch a DefId from a DefPathHash for a foreign crate.
-    fn def_path_hash_to_def_id(&self, cnum: CrateNum, hash: DefPathHash) -> DefId;
-    fn expn_hash_to_expn_id(
-        &self,
-        sess: &Session,
-        cnum: CrateNum,
-        index_guess: u32,
-        hash: ExpnHash,
-    ) -> ExpnId;
-
-    /// Imports all `SourceFile`s from the given crate into the current session.
-    /// This normally happens automatically when we decode a `Span` from
-    /// that crate's metadata - however, the incr comp cache needs
-    /// to trigger this manually when decoding a foreign `Span`
-    fn import_source_files(&self, sess: &Session, cnum: CrateNum);
 }
 
 pub type CrateStoreDyn = dyn CrateStore + sync::DynSync + sync::DynSend;