@@ -62,7 +62,7 @@ use rustc_session::config::CrateType;
62
62
use rustc_session:: cstore:: { CrateStoreDyn , Untracked } ;
63
63
use rustc_session:: lint:: Lint ;
64
64
use rustc_session:: { Limit , MetadataKind , Session } ;
65
- use rustc_span:: def_id:: { DefPathHash , StableCrateId } ;
65
+ use rustc_span:: def_id:: { DefPathHash , StableCrateId , CRATE_DEF_ID } ;
66
66
use rustc_span:: symbol:: { kw, sym, Ident , Symbol } ;
67
67
use rustc_span:: { Span , DUMMY_SP } ;
68
68
use rustc_target:: abi:: { FieldIdx , Layout , LayoutS , TargetDataLayout , VariantIdx } ;
@@ -547,8 +547,9 @@ impl<'tcx> TyCtxt<'tcx> {
547
547
pub fn feed_local_crate ( self ) -> TyCtxtFeed < ' tcx , CrateNum > {
548
548
TyCtxtFeed { tcx : self , key : LOCAL_CRATE }
549
549
}
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 }
552
553
}
553
554
554
555
/// In order to break cycles involving `AnonConst`, we need to set the expected type by side
@@ -1126,7 +1127,7 @@ impl<'tcx> TyCtxt<'tcx> {
1126
1127
// needs to be re-evaluated.
1127
1128
self . dep_graph . read_index ( DepNodeIndex :: FOREVER_RED_NODE ) ;
1128
1129
1129
- let feed = self . feed_local_def_id ( def_id) ;
1130
+ let feed = TyCtxtFeed { tcx : self , key : def_id } ;
1130
1131
feed. def_kind ( def_kind) ;
1131
1132
// Unique types created for closures participate in type privacy checking.
1132
1133
// They have visibilities inherited from the module they are defined in.
0 commit comments