@@ -75,9 +75,6 @@ pub use rustc_query_system::dep_graph::{DepContext, DepNodeParams};
7575/// of the `DepKind`. Overall, this allows to implement `DepContext` using this manual
7676/// jump table instead of large matches.
7777pub struct DepKindStruct {
78- /// Whether the DepNode has parameters (query keys).
79- pub ( super ) has_params : bool ,
80-
8178 /// Anonymous queries cannot be replayed from one compiler invocation to the next.
8279 /// When their result is needed, it is recomputed. They are useful for fine-grained
8380 /// dependency tracking, and caching within one compiler invocation.
@@ -115,13 +112,6 @@ impl DepKind {
115112 }
116113}
117114
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-
125115macro_rules! is_anon_attr {
126116 ( anon) => {
127117 true
@@ -156,31 +146,27 @@ pub mod dep_kind {
156146
157147 // We use this for most things when incr. comp. is turned off.
158148 pub const Null : DepKindStruct = DepKindStruct {
159- has_params : false ,
160149 is_anon : false ,
161150 is_eval_always : false ,
162151
163152 fingerprint_style : || FingerprintStyle :: Unit ,
164153 } ;
165154
166155 pub const TraitSelect : DepKindStruct = DepKindStruct {
167- has_params : false ,
168156 is_anon : true ,
169157 is_eval_always : false ,
170158
171159 fingerprint_style : || FingerprintStyle :: Unit ,
172160 } ;
173161
174162 pub const CompileCodegenUnit : DepKindStruct = DepKindStruct {
175- has_params : true ,
176163 is_anon : false ,
177164 is_eval_always : false ,
178165
179166 fingerprint_style : || FingerprintStyle :: Opaque ,
180167 } ;
181168
182169 pub const CompileMonoItem : DepKindStruct = DepKindStruct {
183- has_params : true ,
184170 is_anon : false ,
185171 is_eval_always : false ,
186172
@@ -193,7 +179,6 @@ pub mod dep_kind {
193179 $variant: ident $( ( $tuple_arg_ty: ty $( , ) ? ) ) *
194180 , ) * ) => (
195181 $( pub const $variant: DepKindStruct = {
196- const has_params: bool = $( { erase!( $tuple_arg_ty) ; true } |) * false ;
197182 const is_anon: bool = contains_anon_attr!( $( $attrs) * ) ;
198183 const is_eval_always: bool = contains_eval_always_attr!( $( $attrs) * ) ;
199184
@@ -204,7 +189,6 @@ pub mod dep_kind {
204189 }
205190
206191 DepKindStruct {
207- has_params,
208192 is_anon,
209193 is_eval_always,
210194 fingerprint_style,
@@ -350,13 +334,7 @@ impl DepNodeExt for DepNode {
350334
351335 match kind. fingerprint_style ( ) {
352336 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) ) ,
360338 FingerprintStyle :: DefPathHash => Ok ( DepNode :: from_def_path_hash ( def_path_hash, kind) ) ,
361339 }
362340 }
0 commit comments