File tree Expand file tree Collapse file tree 3 files changed +4
-28
lines changed
librustc_query_system/dep_graph Expand file tree Collapse file tree 3 files changed +4
-28
lines changed Original file line number Diff line number Diff line change @@ -62,24 +62,6 @@ impl rustc_query_system::dep_graph::DepKind for DepKind {
62
62
write ! ( f, ")" )
63
63
}
64
64
65
- fn assert_ignored ( ) {
66
- ty:: tls:: with_context_opt ( |icx| {
67
- let icx = if let Some ( icx) = icx { icx } else { return } ;
68
- assert ! ( icx. task_deps. is_none( ) , "expected no task dependency tracking" ) ;
69
- } )
70
- }
71
-
72
- fn with_ignore_deps < OP , R > ( op : OP ) -> R
73
- where
74
- OP : FnOnce ( ) -> R ,
75
- {
76
- ty:: tls:: with_context ( |icx| {
77
- let icx = ty:: tls:: ImplicitCtxt { task_deps : None , ..icx. clone ( ) } ;
78
-
79
- ty:: tls:: enter_context ( & icx, |_| op ( ) )
80
- } )
81
- }
82
-
83
65
fn with_deps < OP , R > ( task_deps : Option < & Lock < TaskDeps > > , op : OP ) -> R
84
66
where
85
67
OP : FnOnce ( ) -> R ,
Original file line number Diff line number Diff line change @@ -151,15 +151,17 @@ impl<K: DepKind> DepGraph<K> {
151
151
152
152
pub fn assert_ignored ( & self ) {
153
153
if let Some ( ..) = self . data {
154
- K :: assert_ignored ( ) ;
154
+ K :: read_deps ( |task_deps| {
155
+ assert ! ( task_deps. is_none( ) , "expected no task dependency tracking" ) ;
156
+ } )
155
157
}
156
158
}
157
159
158
160
pub fn with_ignore < OP , R > ( & self , op : OP ) -> R
159
161
where
160
162
OP : FnOnce ( ) -> R ,
161
163
{
162
- K :: with_ignore_deps ( op)
164
+ K :: with_deps ( None , op)
163
165
}
164
166
165
167
/// Starts a new dep-graph task. Dep-graph tasks are specified
Original file line number Diff line number Diff line change @@ -76,14 +76,6 @@ pub trait DepKind: Copy + fmt::Debug + Eq + Ord + Hash {
76
76
/// Implementation of `std::fmt::Debug` for `DepNode`.
77
77
fn debug_node ( node : & DepNode < Self > , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result ;
78
78
79
- /// Assert the current implicit context does not track any dependency.
80
- fn assert_ignored ( ) ;
81
-
82
- /// Execute the operation ignoring the dependencies.
83
- fn with_ignore_deps < OP , R > ( op : OP ) -> R
84
- where
85
- OP : FnOnce ( ) -> R ;
86
-
87
79
/// Execute the operation with provided dependencies.
88
80
fn with_deps < OP , R > ( deps : Option < & Lock < TaskDeps < Self > > > , op : OP ) -> R
89
81
where
You can’t perform that action at this time.
0 commit comments