about summary refs log tree commit diff
path: root/compiler/rustc_session
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2023-08-08 20:08:24 +0800
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2023-08-09 14:35:23 +0800
commit907aa440cf51859b97dd0a1e25b6f15d344f4ebe (patch)
tree3ae4371e150c7cf91f8428d18613f83fa830d3fa /compiler/rustc_session
parent0b89aac08d7190961544ced9e868cc20ce24d786 (diff)
rustc: Move `stable_crate_id` from `Session` to `GlobalCtxt`
Removes a piece of mutable state.
Follow up to #114578.
Diffstat (limited to 'compiler/rustc_session')
-rw-r--r--compiler/rustc_session/src/session.rs12
1 files changed, 0 insertions, 12 deletions
diff --git a/compiler/rustc_session/src/session.rs b/compiler/rustc_session/src/session.rs
index a1f995ad279..5d7572f65a5 100644
--- a/compiler/rustc_session/src/session.rs
+++ b/compiler/rustc_session/src/session.rs
@@ -152,13 +152,6 @@ pub struct Session {
     /// Input, input file path and output file path to this compilation process.
     pub io: CompilerIO,
 
-    /// The `stable_crate_id` is constructed out of the crate name and all the
-    /// `-C metadata` arguments passed to the compiler. Its value forms a unique
-    /// global identifier for the crate. It is used to allow multiple crates
-    /// with the same name to coexist. See the
-    /// `rustc_symbol_mangling` crate for more information.
-    pub stable_crate_id: OnceCell<StableCrateId>,
-
     features: OnceCell<rustc_feature::Features>,
 
     incr_comp_session: OneThread<RefCell<IncrCompSession>>,
@@ -309,10 +302,6 @@ impl Session {
         self.parse_sess.span_diagnostic.emit_future_breakage_report(diags);
     }
 
-    pub fn local_stable_crate_id(&self) -> StableCrateId {
-        self.stable_crate_id.get().copied().unwrap()
-    }
-
     /// Returns true if the crate is a testing one.
     pub fn is_test_crate(&self) -> bool {
         self.opts.test
@@ -1475,7 +1464,6 @@ pub fn build_session(
         parse_sess,
         sysroot,
         io,
-        stable_crate_id: OnceCell::new(),
         features: OnceCell::new(),
         incr_comp_session: OneThread::new(RefCell::new(IncrCompSession::NotInitialized)),
         cgu_reuse_tracker,