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