@@ -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 } ;
@@ -540,8 +540,9 @@ impl<'tcx> TyCtxt<'tcx> {
540
540
pub fn feed_local_crate ( self ) -> TyCtxtFeed < ' tcx , CrateNum > {
541
541
TyCtxtFeed { tcx : self , key : LOCAL_CRATE }
542
542
}
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 }
545
546
}
546
547
547
548
/// In order to break cycles involving `AnonConst`, we need to set the expected type by side
@@ -1119,7 +1120,7 @@ impl<'tcx> TyCtxt<'tcx> {
1119
1120
// needs to be re-evaluated.
1120
1121
self . dep_graph . read_index ( DepNodeIndex :: FOREVER_RED_NODE ) ;
1121
1122
1122
- let feed = self . feed_local_def_id ( def_id) ;
1123
+ let feed = TyCtxtFeed { tcx : self , key : def_id } ;
1123
1124
feed. def_kind ( def_kind) ;
1124
1125
// Unique types created for closures participate in type privacy checking.
1125
1126
// They have visibilities inherited from the module they are defined in.
0 commit comments