@@ -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 } ;
@@ -540,8 +540,9 @@ impl<'tcx> TyCtxt<'tcx> {
540540 pub fn feed_local_crate ( self ) -> TyCtxtFeed < ' tcx , CrateNum > {
541541 TyCtxtFeed { tcx : self , key : LOCAL_CRATE }
542542 }
543- pub fn feed_local_def_id ( self , key : LocalDefId ) -> TyCtxtFeed < ' tcx , LocalDefId > {
544- TyCtxtFeed { tcx : self , key }
543+
544+ pub fn feed_local_crate_def_id ( self ) -> TyCtxtFeed < ' tcx , LocalDefId > {
545+ TyCtxtFeed { tcx : self , key : CRATE_DEF_ID }
545546 }
546547
547548 /// In order to break cycles involving `AnonConst`, we need to set the expected type by side
@@ -1119,7 +1120,7 @@ impl<'tcx> TyCtxt<'tcx> {
11191120 // needs to be re-evaluated.
11201121 self . dep_graph . read_index ( DepNodeIndex :: FOREVER_RED_NODE ) ;
11211122
1122- let feed = self . feed_local_def_id ( def_id) ;
1123+ let feed = TyCtxtFeed { tcx : self , key : def_id } ;
11231124 feed. def_kind ( def_kind) ;
11241125 // Unique types created for closures participate in type privacy checking.
11251126 // They have visibilities inherited from the module they are defined in.
0 commit comments