@@ -16,7 +16,7 @@ use rustc_fs_util::try_canonicalize;
1616use rustc_hir:: def_id:: { CrateNum , LocalDefId , StableCrateId , LOCAL_CRATE } ;
1717use rustc_hir:: definitions:: Definitions ;
1818use rustc_index:: IndexVec ;
19- use rustc_middle:: ty:: TyCtxt ;
19+ use rustc_middle:: ty:: { TyCtxt , TyCtxtFeed } ;
2020use rustc_session:: config:: { self , CrateType , ExternLocation } ;
2121use rustc_session:: cstore:: { CrateDepKind , CrateSource , ExternCrate , ExternCrateSource } ;
2222use rustc_session:: lint;
@@ -166,7 +166,7 @@ impl CStore {
166166 & mut self ,
167167 root : & CrateRoot ,
168168 tcx : TyCtxt < ' tcx > ,
169- ) -> Result < CrateNum , CrateError > {
169+ ) -> Result < TyCtxtFeed < ' tcx , CrateNum > , CrateError > {
170170 assert_eq ! ( self . metas. len( ) , tcx. untracked( ) . stable_crate_ids. read( ) . len( ) ) ;
171171 let num = tcx. create_crate_num ( root. stable_crate_id ( ) ) . map_err ( |existing| {
172172 // Check for (potential) conflicts with the local crate
@@ -409,7 +409,8 @@ impl<'a, 'tcx> CrateLoader<'a, 'tcx> {
409409 let private_dep = self . is_private_dep ( name. as_str ( ) , private_dep) ;
410410
411411 // Claim this crate number and cache it
412- let cnum = self . cstore . intern_stable_crate_id ( & crate_root, self . tcx ) ?;
412+ let feed = self . cstore . intern_stable_crate_id ( & crate_root, self . tcx ) ?;
413+ let cnum = feed. key ( ) ;
413414
414415 info ! (
415416 "register crate `{}` (cnum = {}. private_dep = {})" ,
0 commit comments