@@ -62,7 +62,7 @@ use rustc_session::config::CrateType;
6262use rustc_session:: cstore:: { CrateStoreDyn , Untracked } ;
6363use rustc_session:: lint:: Lint ;
6464use rustc_session:: { Limit , MetadataKind , Session } ;
65- use rustc_span:: def_id:: { DefPathHash , StableCrateId } ;
65+ use rustc_span:: def_id:: { DefPathHash , StableCrateId , CRATE_DEF_ID } ;
6666use rustc_span:: symbol:: { kw, sym, Ident , Symbol } ;
6767use rustc_span:: { Span , DUMMY_SP } ;
6868use rustc_target:: abi:: { FieldIdx , Layout , LayoutS , TargetDataLayout , VariantIdx } ;
@@ -547,8 +547,9 @@ impl<'tcx> TyCtxt<'tcx> {
547547 pub fn feed_local_crate ( self ) -> TyCtxtFeed < ' tcx , CrateNum > {
548548 TyCtxtFeed { tcx : self , key : LOCAL_CRATE }
549549 }
550- pub fn feed_local_def_id ( self , key : LocalDefId ) -> TyCtxtFeed < ' tcx , LocalDefId > {
551- TyCtxtFeed { tcx : self , key }
550+
551+ pub fn feed_local_crate_def_id ( self ) -> TyCtxtFeed < ' tcx , LocalDefId > {
552+ TyCtxtFeed { tcx : self , key : CRATE_DEF_ID }
552553 }
553554
554555 /// In order to break cycles involving `AnonConst`, we need to set the expected type by side
@@ -1126,7 +1127,7 @@ impl<'tcx> TyCtxt<'tcx> {
11261127 // needs to be re-evaluated.
11271128 self . dep_graph . read_index ( DepNodeIndex :: FOREVER_RED_NODE ) ;
11281129
1129- let feed = self . feed_local_def_id ( def_id) ;
1130+ let feed = TyCtxtFeed { tcx : self , key : def_id } ;
11301131 feed. def_kind ( def_kind) ;
11311132 // Unique types created for closures participate in type privacy checking.
11321133 // They have visibilities inherited from the module they are defined in.
0 commit comments