@@ -38,10 +38,6 @@ struct DepGraphData {
38
38
39
39
/// Work-products that we generate in this run.
40
40
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 > > > ,
45
41
}
46
42
47
43
impl DepGraph {
@@ -51,7 +47,6 @@ impl DepGraph {
51
47
thread : DepGraphThreadData :: new ( enabled) ,
52
48
previous_work_products : RefCell :: new ( FnvHashMap ( ) ) ,
53
49
work_products : RefCell :: new ( FnvHashMap ( ) ) ,
54
- forbidden : RefCell :: new ( Vec :: new ( ) ) ,
55
50
} )
56
51
}
57
52
}
@@ -75,15 +70,6 @@ impl DepGraph {
75
70
raii:: DepTask :: new ( & self . data . thread , key)
76
71
}
77
72
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
-
87
73
pub fn with_ignore < OP , R > ( & self , op : OP ) -> R
88
74
where OP : FnOnce ( ) -> R
89
75
{
@@ -99,12 +85,10 @@ impl DepGraph {
99
85
}
100
86
101
87
pub fn read ( & self , v : DepNode < DefId > ) {
102
- debug_assert ! ( !self . data. forbidden. borrow( ) . contains( & v) ) ;
103
88
self . data . thread . enqueue ( DepMessage :: Read ( v) ) ;
104
89
}
105
90
106
91
pub fn write ( & self , v : DepNode < DefId > ) {
107
- debug_assert ! ( !self . data. forbidden. borrow( ) . contains( & v) ) ;
108
92
self . data . thread . enqueue ( DepMessage :: Write ( v) ) ;
109
93
}
110
94
0 commit comments