@@ -75,9 +75,6 @@ pub use rustc_query_system::dep_graph::{DepContext, DepNodeParams};
75
75
/// of the `DepKind`. Overall, this allows to implement `DepContext` using this manual
76
76
/// jump table instead of large matches.
77
77
pub struct DepKindStruct {
78
- /// Whether the DepNode has parameters (query keys).
79
- pub ( super ) has_params : bool ,
80
-
81
78
/// Anonymous queries cannot be replayed from one compiler invocation to the next.
82
79
/// When their result is needed, it is recomputed. They are useful for fine-grained
83
80
/// dependency tracking, and caching within one compiler invocation.
@@ -115,13 +112,6 @@ impl DepKind {
115
112
}
116
113
}
117
114
118
- // erase!() just makes tokens go away. It's used to specify which macro argument
119
- // is repeated (i.e., which sub-expression of the macro we are in) but don't need
120
- // to actually use any of the arguments.
121
- macro_rules! erase {
122
- ( $x: tt) => { { } } ;
123
- }
124
-
125
115
macro_rules! is_anon_attr {
126
116
( anon) => {
127
117
true
@@ -156,31 +146,27 @@ pub mod dep_kind {
156
146
157
147
// We use this for most things when incr. comp. is turned off.
158
148
pub const Null : DepKindStruct = DepKindStruct {
159
- has_params : false ,
160
149
is_anon : false ,
161
150
is_eval_always : false ,
162
151
163
152
fingerprint_style : || FingerprintStyle :: Unit ,
164
153
} ;
165
154
166
155
pub const TraitSelect : DepKindStruct = DepKindStruct {
167
- has_params : false ,
168
156
is_anon : true ,
169
157
is_eval_always : false ,
170
158
171
159
fingerprint_style : || FingerprintStyle :: Unit ,
172
160
} ;
173
161
174
162
pub const CompileCodegenUnit : DepKindStruct = DepKindStruct {
175
- has_params : true ,
176
163
is_anon : false ,
177
164
is_eval_always : false ,
178
165
179
166
fingerprint_style : || FingerprintStyle :: Opaque ,
180
167
} ;
181
168
182
169
pub const CompileMonoItem : DepKindStruct = DepKindStruct {
183
- has_params : true ,
184
170
is_anon : false ,
185
171
is_eval_always : false ,
186
172
@@ -193,7 +179,6 @@ pub mod dep_kind {
193
179
$variant: ident $( ( $tuple_arg_ty: ty $( , ) ? ) ) *
194
180
, ) * ) => (
195
181
$( pub const $variant: DepKindStruct = {
196
- const has_params: bool = $( { erase!( $tuple_arg_ty) ; true } |) * false ;
197
182
const is_anon: bool = contains_anon_attr!( $( $attrs) * ) ;
198
183
const is_eval_always: bool = contains_eval_always_attr!( $( $attrs) * ) ;
199
184
@@ -204,7 +189,6 @@ pub mod dep_kind {
204
189
}
205
190
206
191
DepKindStruct {
207
- has_params,
208
192
is_anon,
209
193
is_eval_always,
210
194
fingerprint_style,
@@ -350,13 +334,7 @@ impl DepNodeExt for DepNode {
350
334
351
335
match kind. fingerprint_style ( ) {
352
336
FingerprintStyle :: Opaque => Err ( ( ) ) ,
353
- FingerprintStyle :: Unit => {
354
- if !kind. has_params {
355
- Ok ( DepNode :: new_no_params ( kind) )
356
- } else {
357
- Err ( ( ) )
358
- }
359
- }
337
+ FingerprintStyle :: Unit => Ok ( DepNode :: new_no_params ( kind) ) ,
360
338
FingerprintStyle :: DefPathHash => Ok ( DepNode :: from_def_path_hash ( def_path_hash, kind) ) ,
361
339
}
362
340
}
0 commit comments