We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e95bd03 commit ca935ddCopy full SHA for ca935dd
compiler/rustc_middle/src/ty/context.rs
@@ -1299,8 +1299,12 @@ impl<'tcx> TyCtxt<'tcx> {
1299
}
1300
1301
#[inline]
1302
- pub fn stable_crate_id(self, cnum: CrateNum) -> StableCrateId {
1303
- self.def_path_hash(cnum.as_def_id()).stable_crate_id()
+ pub fn stable_crate_id(self, crate_num: CrateNum) -> StableCrateId {
+ if crate_num == LOCAL_CRATE {
1304
+ self.sess.local_stable_crate_id()
1305
+ } else {
1306
+ self.cstore.stable_crate_id_untracked(crate_num)
1307
+ }
1308
1309
1310
pub fn def_path_debug_str(self, def_id: DefId) -> String {
0 commit comments