@@ -8,7 +8,6 @@ use rustc_errors::Diagnostic;
88use rustc_hir:: def_id:: DefId ;
99
1010mod dep_node;
11- mod safe;
1211
1312pub ( crate ) use rustc_query_system:: dep_graph:: DepNodeParams ;
1413pub use rustc_query_system:: dep_graph:: {
@@ -17,8 +16,6 @@ pub use rustc_query_system::dep_graph::{
1716} ;
1817
1918pub use dep_node:: { label_strs, DepConstructor , DepKind , DepNode , DepNodeExt } ;
20- pub use safe:: AssertDepGraphSafe ;
21- pub use safe:: DepGraphSafe ;
2219
2320pub type DepGraph = rustc_query_system:: dep_graph:: DepGraph < DepKind > ;
2421pub type TaskDeps = rustc_query_system:: dep_graph:: TaskDeps < DepKind > ;
@@ -27,6 +24,8 @@ pub type PreviousDepGraph = rustc_query_system::dep_graph::PreviousDepGraph<DepK
2724pub type SerializedDepGraph = rustc_query_system:: dep_graph:: SerializedDepGraph < DepKind > ;
2825
2926impl rustc_query_system:: dep_graph:: DepKind for DepKind {
27+ const NULL : Self = DepKind :: Null ;
28+
3029 fn is_eval_always ( & self ) -> bool {
3130 DepKind :: is_eval_always ( self )
3231 }
@@ -82,6 +81,10 @@ impl rustc_query_system::dep_graph::DepKind for DepKind {
8281 op ( icx. task_deps )
8382 } )
8483 }
84+
85+ fn can_reconstruct_query_key ( & self ) -> bool {
86+ DepKind :: can_reconstruct_query_key ( self )
87+ }
8588}
8689
8790impl < ' tcx > DepContext for TyCtxt < ' tcx > {
@@ -92,6 +95,10 @@ impl<'tcx> DepContext for TyCtxt<'tcx> {
9295 TyCtxt :: create_stable_hashing_context ( * self )
9396 }
9497
98+ fn debug_dep_tasks ( & self ) -> bool {
99+ self . sess . opts . debugging_opts . dep_tasks
100+ }
101+
95102 fn try_force_from_dep_node ( & self , dep_node : & DepNode ) -> bool {
96103 // FIXME: This match is just a workaround for incremental bugs and should
97104 // be removed. https://github.com/rust-lang/rust/issues/62649 is one such
@@ -160,6 +167,14 @@ impl<'tcx> DepContext for TyCtxt<'tcx> {
160167 self . queries . on_disk_cache . store_diagnostics ( dep_node_index, diagnostics)
161168 }
162169
170+ fn store_diagnostics_for_anon_node (
171+ & self ,
172+ dep_node_index : DepNodeIndex ,
173+ diagnostics : ThinVec < Diagnostic > ,
174+ ) {
175+ self . queries . on_disk_cache . store_diagnostics_for_anon_node ( dep_node_index, diagnostics)
176+ }
177+
163178 fn profiler ( & self ) -> & SelfProfilerRef {
164179 & self . prof
165180 }
@@ -169,23 +184,3 @@ fn def_id_corresponds_to_hir_dep_node(tcx: TyCtxt<'_>, def_id: DefId) -> bool {
169184 let hir_id = tcx. hir ( ) . as_local_hir_id ( def_id) . unwrap ( ) ;
170185 def_id. index == hir_id. owner . local_def_index
171186}
172-
173- impl rustc_query_system:: HashStableContext for StableHashingContext < ' _ > {
174- fn debug_dep_tasks ( & self ) -> bool {
175- self . sess ( ) . opts . debugging_opts . dep_tasks
176- }
177- }
178-
179- impl rustc_query_system:: HashStableContextProvider < StableHashingContext < ' tcx > > for TyCtxt < ' tcx > {
180- fn get_stable_hashing_context ( & self ) -> StableHashingContext < ' tcx > {
181- self . create_stable_hashing_context ( )
182- }
183- }
184-
185- impl rustc_query_system:: HashStableContextProvider < StableHashingContext < ' a > >
186- for StableHashingContext < ' a >
187- {
188- fn get_stable_hashing_context ( & self ) -> Self {
189- self . clone ( )
190- }
191- }
0 commit comments