This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
compiler/rustc_middle/src/ty Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -1046,12 +1046,6 @@ impl<'tcx> TyCtxtAt<'tcx> {
10461046 name : Symbol ,
10471047 def_kind : DefKind ,
10481048 ) -> TyCtxtFeed < ' tcx , LocalDefId > {
1049- // This function modifies `self.definitions` using a side-effect.
1050- // We need to ensure that these side effects are re-run by the incr. comp. engine.
1051- // Depending on the forever-red node will tell the graph that the calling query
1052- // needs to be re-evaluated.
1053- self . dep_graph . read_index ( DepNodeIndex :: FOREVER_RED_NODE ) ;
1054-
10551049 // The following call has the side effect of modifying the tables inside `definitions`.
10561050 // These very tables are relied on by the incr. comp. engine to decode DepNodes and to
10571051 // decode the on-disk cache.
@@ -1080,6 +1074,12 @@ impl<'tcx> TyCtxt<'tcx> {
10801074 let data = def_kind. def_path_data ( name) ;
10811075 let def_id = self . untracked . definitions . write ( ) . create_def ( parent, data) ;
10821076
1077+ // This function modifies `self.definitions` using a side-effect.
1078+ // We need to ensure that these side effects are re-run by the incr. comp. engine.
1079+ // Depending on the forever-red node will tell the graph that the calling query
1080+ // needs to be re-evaluated.
1081+ self . dep_graph . read_index ( DepNodeIndex :: FOREVER_RED_NODE ) ;
1082+
10831083 let feed = self . feed_local_def_id ( def_id) ;
10841084 feed. def_kind ( def_kind) ;
10851085 // Unique types created for closures participate in type privacy checking.
You can’t perform that action at this time.
0 commit comments