@@ -60,7 +60,7 @@ use rustc_session::config::CrateType;
6060use rustc_session:: cstore:: { CrateStoreDyn , Untracked } ;
6161use rustc_session:: lint:: Lint ;
6262use rustc_session:: { Limit , MetadataKind , Session } ;
63- use rustc_span:: def_id:: { DefPathHash , StableCrateId } ;
63+ use rustc_span:: def_id:: { DefPathHash , StableCrateId , CRATE_DEF_ID } ;
6464use rustc_span:: symbol:: { kw, sym, Ident , Symbol } ;
6565use rustc_span:: { Span , DUMMY_SP } ;
6666use rustc_target:: abi:: { FieldIdx , Layout , LayoutS , TargetDataLayout , VariantIdx } ;
@@ -544,8 +544,9 @@ impl<'tcx> TyCtxt<'tcx> {
544544 pub fn feed_local_crate ( self ) -> TyCtxtFeed < ' tcx , CrateNum > {
545545 TyCtxtFeed { tcx : self , key : LOCAL_CRATE }
546546 }
547- pub fn feed_local_def_id ( self , key : LocalDefId ) -> TyCtxtFeed < ' tcx , LocalDefId > {
548- TyCtxtFeed { tcx : self , key }
547+
548+ pub fn feed_local_crate_def_id ( self ) -> TyCtxtFeed < ' tcx , LocalDefId > {
549+ TyCtxtFeed { tcx : self , key : CRATE_DEF_ID }
549550 }
550551
551552 /// In order to break cycles involving `AnonConst`, we need to set the expected type by side
@@ -1123,7 +1124,7 @@ impl<'tcx> TyCtxt<'tcx> {
11231124 // needs to be re-evaluated.
11241125 self . dep_graph . read_index ( DepNodeIndex :: FOREVER_RED_NODE ) ;
11251126
1126- let feed = self . feed_local_def_id ( def_id) ;
1127+ let feed = TyCtxtFeed { tcx : self , key : def_id } ;
11271128 feed. def_kind ( def_kind) ;
11281129 // Unique types created for closures participate in type privacy checking.
11291130 // They have visibilities inherited from the module they are defined in.
0 commit comments