@@ -25,7 +25,7 @@ use {super::debug::EdgeFilter, std::env};
2525
2626use super :: query:: DepGraphQuery ;
2727use super :: serialized:: { GraphEncoder , SerializedDepGraph , SerializedDepNodeIndex } ;
28- use super :: { DepKind , DepNode , DepsType , HasDepContext , WorkProductId } ;
28+ use super :: { DepKind , DepNode , HasDepContext , WorkProductId , read_deps , with_deps } ;
2929use crate :: dep_graph:: edges:: EdgesVec ;
3030use crate :: ty:: TyCtxt ;
3131use crate :: verify_ich:: incremental_verify_ich;
@@ -126,15 +126,15 @@ impl DepGraph {
126126
127127 // Instantiate a node with zero dependencies only once for anonymous queries.
128128 let _green_node_index = current. alloc_new_node (
129- DepNode { kind : DepsType :: DEP_KIND_ANON_ZERO_DEPS , hash : current. anon_id_seed . into ( ) } ,
129+ DepNode { kind : DepKind :: ANON_ZERO_DEPS , hash : current. anon_id_seed . into ( ) } ,
130130 EdgesVec :: new ( ) ,
131131 Fingerprint :: ZERO ,
132132 ) ;
133133 assert_eq ! ( _green_node_index, DepNodeIndex :: SINGLETON_ZERO_DEPS_ANON_NODE ) ;
134134
135135 // Instantiate a dependy-less red node only once for anonymous queries.
136136 let red_node_index = current. alloc_new_node (
137- DepNode { kind : DepsType :: DEP_KIND_RED , hash : Fingerprint :: ZERO . into ( ) } ,
137+ DepNode { kind : DepKind :: RED , hash : Fingerprint :: ZERO . into ( ) } ,
138138 EdgesVec :: new ( ) ,
139139 Fingerprint :: ZERO ,
140140 ) ;
@@ -181,7 +181,7 @@ impl DepGraph {
181181
182182 pub fn assert_ignored ( & self ) {
183183 if let Some ( ..) = self . data {
184- DepsType :: read_deps ( |task_deps| {
184+ read_deps ( |task_deps| {
185185 assert_matches ! (
186186 task_deps,
187187 TaskDepsRef :: Ignore ,
@@ -195,7 +195,7 @@ impl DepGraph {
195195 where
196196 OP : FnOnce ( ) -> R ,
197197 {
198- DepsType :: with_deps ( TaskDepsRef :: Ignore , op)
198+ with_deps ( TaskDepsRef :: Ignore , op)
199199 }
200200
201201 /// Used to wrap the deserialization of a query result from disk,
@@ -248,7 +248,7 @@ impl DepGraph {
248248 where
249249 OP : FnOnce ( ) -> R ,
250250 {
251- DepsType :: with_deps ( TaskDepsRef :: Forbid , op)
251+ with_deps ( TaskDepsRef :: Forbid , op)
252252 }
253253
254254 #[ inline( always) ]
@@ -340,7 +340,7 @@ impl DepGraphData {
340340 } ,
341341 ) ;
342342
343- let with_deps = |task_deps| DepsType :: with_deps ( task_deps, || task ( cx, arg) ) ;
343+ let with_deps = |task_deps| with_deps ( task_deps, || task ( cx, arg) ) ;
344344 let ( result, edges) = if cx. dep_context ( ) . is_eval_always ( key. kind ) {
345345 ( with_deps ( TaskDepsRef :: EvalAlways ) , EdgesVec :: new ( ) )
346346 } else {
@@ -387,7 +387,7 @@ impl DepGraphData {
387387 None ,
388388 128 ,
389389 ) ) ;
390- let result = DepsType :: with_deps ( TaskDepsRef :: Allow ( & task_deps) , op) ;
390+ let result = with_deps ( TaskDepsRef :: Allow ( & task_deps) , op) ;
391391 let task_deps = task_deps. into_inner ( ) ;
392392 let reads = task_deps. reads ;
393393
@@ -460,7 +460,7 @@ impl DepGraph {
460460 #[ inline]
461461 pub fn read_index ( & self , dep_node_index : DepNodeIndex ) {
462462 if let Some ( ref data) = self . data {
463- DepsType :: read_deps ( |task_deps| {
463+ read_deps ( |task_deps| {
464464 let mut task_deps = match task_deps {
465465 TaskDepsRef :: Allow ( deps) => deps. lock ( ) ,
466466 TaskDepsRef :: EvalAlways => {
@@ -517,7 +517,7 @@ impl DepGraph {
517517 #[ inline]
518518 pub fn record_diagnostic < ' tcx > ( & self , tcx : TyCtxt < ' tcx > , diagnostic : & DiagInner ) {
519519 if let Some ( ref data) = self . data {
520- DepsType :: read_deps ( |task_deps| match task_deps {
520+ read_deps ( |task_deps| match task_deps {
521521 TaskDepsRef :: EvalAlways | TaskDepsRef :: Ignore => return ,
522522 TaskDepsRef :: Forbid | TaskDepsRef :: Allow ( ..) => {
523523 self . read_index ( data. encode_diagnostic ( tcx, diagnostic) ) ;
@@ -594,7 +594,7 @@ impl DepGraph {
594594 }
595595
596596 let mut edges = EdgesVec :: new ( ) ;
597- DepsType :: read_deps ( |task_deps| match task_deps {
597+ read_deps ( |task_deps| match task_deps {
598598 TaskDepsRef :: Allow ( deps) => edges. extend ( deps. lock ( ) . reads . iter ( ) . copied ( ) ) ,
599599 TaskDepsRef :: EvalAlways => {
600600 edges. push ( DepNodeIndex :: FOREVER_RED_NODE ) ;
@@ -678,7 +678,7 @@ impl DepGraphData {
678678 // Use `send_new` so we get an unique index, even though the dep node is not.
679679 let dep_node_index = self . current . encoder . send_new (
680680 DepNode {
681- kind : DepsType :: DEP_KIND_SIDE_EFFECT ,
681+ kind : DepKind :: SIDE_EFFECT ,
682682 hash : PackedFingerprint :: from ( Fingerprint :: ZERO ) ,
683683 } ,
684684 Fingerprint :: ZERO ,
@@ -695,7 +695,7 @@ impl DepGraphData {
695695 /// refer to a node created used `encode_diagnostic` in the previous session.
696696 #[ inline]
697697 fn force_diagnostic_node < ' tcx > ( & self , tcx : TyCtxt < ' tcx > , prev_index : SerializedDepNodeIndex ) {
698- DepsType :: with_deps ( TaskDepsRef :: Ignore , || {
698+ with_deps ( TaskDepsRef :: Ignore , || {
699699 let side_effect = tcx. load_side_effect ( prev_index) . unwrap ( ) ;
700700
701701 match & side_effect {
@@ -711,7 +711,7 @@ impl DepGraphData {
711711 prev_index,
712712 & self . colors ,
713713 DepNode {
714- kind : DepsType :: DEP_KIND_SIDE_EFFECT ,
714+ kind : DepKind :: SIDE_EFFECT ,
715715 hash : PackedFingerprint :: from ( Fingerprint :: ZERO ) ,
716716 } ,
717717 Fingerprint :: ZERO ,
0 commit comments