@@ -38,10 +38,6 @@ struct DepGraphData {
3838
3939 /// Work-products that we generate in this run.
4040 work_products : RefCell < FnvHashMap < Arc < WorkProductId > , WorkProduct > > ,
41-
42- /// Tracks nodes that are forbidden to read/write; see
43- /// `DepGraph::forbid`. Used for debugging only.
44- forbidden : RefCell < Vec < DepNode < DefId > > > ,
4541}
4642
4743impl DepGraph {
@@ -51,7 +47,6 @@ impl DepGraph {
5147 thread : DepGraphThreadData :: new ( enabled) ,
5248 previous_work_products : RefCell :: new ( FnvHashMap ( ) ) ,
5349 work_products : RefCell :: new ( FnvHashMap ( ) ) ,
54- forbidden : RefCell :: new ( Vec :: new ( ) ) ,
5550 } )
5651 }
5752 }
@@ -75,15 +70,6 @@ impl DepGraph {
7570 raii:: DepTask :: new ( & self . data . thread , key)
7671 }
7772
78- /// Debugging aid -- forbid reads/writes to `key` while the return
79- /// value is in scope. Note that this is only available when debug
80- /// assertions are enabled -- you should not check in code that
81- /// invokes this function.
82- #[ cfg( debug_assertions) ]
83- pub fn forbid < ' graph > ( & ' graph self , key : DepNode < DefId > ) -> raii:: Forbid < ' graph > {
84- raii:: Forbid :: new ( & self . data . forbidden , key)
85- }
86-
8773 pub fn with_ignore < OP , R > ( & self , op : OP ) -> R
8874 where OP : FnOnce ( ) -> R
8975 {
@@ -99,12 +85,10 @@ impl DepGraph {
9985 }
10086
10187 pub fn read ( & self , v : DepNode < DefId > ) {
102- debug_assert ! ( !self . data. forbidden. borrow( ) . contains( & v) ) ;
10388 self . data . thread . enqueue ( DepMessage :: Read ( v) ) ;
10489 }
10590
10691 pub fn write ( & self , v : DepNode < DefId > ) {
107- debug_assert ! ( !self . data. forbidden. borrow( ) . contains( & v) ) ;
10892 self . data . thread . enqueue ( DepMessage :: Write ( v) ) ;
10993 }
11094
0 commit comments