1
Fork 0

rustc: Move stable_crate_id from Session to GlobalCtxt

Removes a piece of mutable state.
Follow up to #114578.
This commit is contained in:
Vadim Petrochenkov 2023-08-08 20:08:24 +08:00
parent 0b89aac08d
commit 907aa440cf
10 changed files with 25 additions and 27 deletions

View file

@ -180,7 +180,7 @@ fn compute_symbol_name<'tcx>(
if let Some(def_id) = def_id.as_local() {
if tcx.proc_macro_decls_static(()) == Some(def_id) {
let stable_crate_id = tcx.sess.local_stable_crate_id();
let stable_crate_id = tcx.stable_crate_id(LOCAL_CRATE);
return tcx.sess.generate_proc_macro_decls_symbol(stable_crate_id);
}
}