@@ -16,7 +16,7 @@ use rustc_fs_util::try_canonicalize;
16
16
use rustc_hir:: def_id:: { CrateNum , LocalDefId , StableCrateId , LOCAL_CRATE } ;
17
17
use rustc_hir:: definitions:: Definitions ;
18
18
use rustc_index:: IndexVec ;
19
- use rustc_middle:: ty:: TyCtxt ;
19
+ use rustc_middle:: ty:: { TyCtxt , TyCtxtFeed } ;
20
20
use rustc_session:: config:: { self , CrateType , ExternLocation } ;
21
21
use rustc_session:: cstore:: { CrateDepKind , CrateSource , ExternCrate , ExternCrateSource } ;
22
22
use rustc_session:: lint;
@@ -166,7 +166,7 @@ impl CStore {
166
166
& mut self ,
167
167
root : & CrateRoot ,
168
168
tcx : TyCtxt < ' tcx > ,
169
- ) -> Result < CrateNum , CrateError > {
169
+ ) -> Result < TyCtxtFeed < ' tcx , CrateNum > , CrateError > {
170
170
assert_eq ! ( self . metas. len( ) , tcx. untracked( ) . stable_crate_ids. read( ) . len( ) ) ;
171
171
let num = tcx. create_crate_num ( root. stable_crate_id ( ) ) . map_err ( |existing| {
172
172
// Check for (potential) conflicts with the local crate
@@ -409,7 +409,8 @@ impl<'a, 'tcx> CrateLoader<'a, 'tcx> {
409
409
let private_dep = self . is_private_dep ( name. as_str ( ) , private_dep) ;
410
410
411
411
// 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 ( ) ;
413
414
414
415
info ! (
415
416
"register crate `{}` (cnum = {}. private_dep = {})" ,
0 commit comments