3
3
use std:: fmt:: { self , Debug , Formatter } ;
4
4
5
5
use rustc_index:: IndexVec ;
6
- use rustc_macros:: { HashStable , TyDecodable , TyEncodable , TypeFoldable , TypeVisitable } ;
6
+ use rustc_macros:: { HashStable , NoopTypeTraversable , TyDecodable , TyEncodable } ;
7
7
use rustc_span:: { Span , Symbol } ;
8
8
9
9
rustc_index:: newtype_index! {
@@ -77,7 +77,7 @@ impl ConditionId {
77
77
/// but the zero/counter/expression distinction is also useful for representing
78
78
/// the value of code/gap mappings, and the true/false arms of branch mappings.
79
79
#[ derive( Copy , Clone , PartialEq , Eq ) ]
80
- #[ derive( TyEncodable , TyDecodable , Hash , HashStable , TypeFoldable , TypeVisitable ) ]
80
+ #[ derive( TyEncodable , TyDecodable , Hash , HashStable ) ]
81
81
pub enum CovTerm {
82
82
Zero ,
83
83
Counter ( CounterId ) ,
@@ -94,7 +94,7 @@ impl Debug for CovTerm {
94
94
}
95
95
}
96
96
97
- #[ derive( Clone , PartialEq , TyEncodable , TyDecodable , Hash , HashStable , TypeFoldable , TypeVisitable ) ]
97
+ #[ derive( Clone , PartialEq , TyEncodable , TyDecodable , Hash , HashStable , NoopTypeTraversable ) ]
98
98
pub enum CoverageKind {
99
99
/// Marks a span that might otherwise not be represented in MIR, so that
100
100
/// coverage instrumentation can associate it with its enclosing block/BCB.
@@ -155,8 +155,8 @@ impl Debug for CoverageKind {
155
155
}
156
156
}
157
157
158
- #[ derive( Clone , TyEncodable , TyDecodable , Hash , HashStable , PartialEq , Eq , PartialOrd , Ord ) ]
159
- #[ derive( TypeFoldable , TypeVisitable ) ]
158
+ #[ derive( Copy , Clone , PartialEq , Eq , Hash , HashStable ) ]
159
+ #[ derive( TyEncodable , TyDecodable , NoopTypeTraversable ) ]
160
160
pub struct SourceRegion {
161
161
pub file_name : Symbol ,
162
162
pub start_line : u32 ,
@@ -176,7 +176,7 @@ impl Debug for SourceRegion {
176
176
}
177
177
178
178
#[ derive( Copy , Clone , Debug , PartialEq , Eq , Hash , HashStable ) ]
179
- #[ derive( TyEncodable , TyDecodable , TypeFoldable , TypeVisitable ) ]
179
+ #[ derive( TyEncodable , TyDecodable , NoopTypeTraversable ) ]
180
180
pub enum Op {
181
181
Subtract ,
182
182
Add ,
@@ -193,15 +193,15 @@ impl Op {
193
193
}
194
194
195
195
#[ derive( Clone , Debug ) ]
196
- #[ derive( TyEncodable , TyDecodable , Hash , HashStable , TypeFoldable , TypeVisitable ) ]
196
+ #[ derive( TyEncodable , TyDecodable , Hash , HashStable , NoopTypeTraversable ) ]
197
197
pub struct Expression {
198
198
pub lhs : CovTerm ,
199
199
pub op : Op ,
200
200
pub rhs : CovTerm ,
201
201
}
202
202
203
203
#[ derive( Clone , Debug ) ]
204
- #[ derive( TyEncodable , TyDecodable , Hash , HashStable , TypeFoldable , TypeVisitable ) ]
204
+ #[ derive( TyEncodable , TyDecodable , Hash , HashStable , NoopTypeTraversable ) ]
205
205
pub enum MappingKind {
206
206
/// Associates a normal region of code with a counter/expression/zero.
207
207
Code ( CovTerm ) ,
@@ -233,7 +233,7 @@ impl MappingKind {
233
233
}
234
234
235
235
#[ derive( Clone , Debug ) ]
236
- #[ derive( TyEncodable , TyDecodable , Hash , HashStable , TypeFoldable , TypeVisitable ) ]
236
+ #[ derive( TyEncodable , TyDecodable , Hash , HashStable , NoopTypeTraversable ) ]
237
237
pub struct Mapping {
238
238
pub kind : MappingKind ,
239
239
pub source_region : SourceRegion ,
@@ -243,7 +243,7 @@ pub struct Mapping {
243
243
/// to be used in conjunction with the individual coverage statements injected
244
244
/// into the function's basic blocks.
245
245
#[ derive( Clone , Debug ) ]
246
- #[ derive( TyEncodable , TyDecodable , Hash , HashStable , TypeFoldable , TypeVisitable ) ]
246
+ #[ derive( TyEncodable , TyDecodable , Hash , HashStable , NoopTypeTraversable ) ]
247
247
pub struct FunctionCoverageInfo {
248
248
pub function_source_hash : u64 ,
249
249
pub num_counters : usize ,
@@ -262,7 +262,7 @@ pub struct FunctionCoverageInfo {
262
262
/// ("Hi" indicates that this is "high-level" information collected at the
263
263
/// THIR/MIR boundary, before the MIR-based coverage instrumentation pass.)
264
264
#[ derive( Clone , Debug ) ]
265
- #[ derive( TyEncodable , TyDecodable , Hash , HashStable , TypeFoldable , TypeVisitable ) ]
265
+ #[ derive( TyEncodable , TyDecodable , Hash , HashStable , NoopTypeTraversable ) ]
266
266
pub struct CoverageInfoHi {
267
267
/// 1 more than the highest-numbered [`CoverageKind::BlockMarker`] that was
268
268
/// injected into the MIR body. This makes it possible to allocate per-ID
@@ -276,23 +276,23 @@ pub struct CoverageInfoHi {
276
276
}
277
277
278
278
#[ derive( Clone , Debug ) ]
279
- #[ derive( TyEncodable , TyDecodable , Hash , HashStable , TypeFoldable , TypeVisitable ) ]
279
+ #[ derive( TyEncodable , TyDecodable , Hash , HashStable , NoopTypeTraversable ) ]
280
280
pub struct BranchSpan {
281
281
pub span : Span ,
282
282
pub true_marker : BlockMarkerId ,
283
283
pub false_marker : BlockMarkerId ,
284
284
}
285
285
286
286
#[ derive( Copy , Clone , Debug ) ]
287
- #[ derive( TyEncodable , TyDecodable , Hash , HashStable , TypeFoldable , TypeVisitable ) ]
287
+ #[ derive( TyEncodable , TyDecodable , Hash , HashStable , NoopTypeTraversable ) ]
288
288
pub struct ConditionInfo {
289
289
pub condition_id : ConditionId ,
290
290
pub true_next_id : Option < ConditionId > ,
291
291
pub false_next_id : Option < ConditionId > ,
292
292
}
293
293
294
294
#[ derive( Clone , Debug ) ]
295
- #[ derive( TyEncodable , TyDecodable , Hash , HashStable , TypeFoldable , TypeVisitable ) ]
295
+ #[ derive( TyEncodable , TyDecodable , Hash , HashStable , NoopTypeTraversable ) ]
296
296
pub struct MCDCBranchSpan {
297
297
pub span : Span ,
298
298
pub condition_info : ConditionInfo ,
@@ -301,14 +301,14 @@ pub struct MCDCBranchSpan {
301
301
}
302
302
303
303
#[ derive( Copy , Clone , Debug ) ]
304
- #[ derive( TyEncodable , TyDecodable , Hash , HashStable , TypeFoldable , TypeVisitable ) ]
304
+ #[ derive( TyEncodable , TyDecodable , Hash , HashStable , NoopTypeTraversable ) ]
305
305
pub struct DecisionInfo {
306
306
pub bitmap_idx : u32 ,
307
307
pub num_conditions : u16 ,
308
308
}
309
309
310
310
#[ derive( Clone , Debug ) ]
311
- #[ derive( TyEncodable , TyDecodable , Hash , HashStable , TypeFoldable , TypeVisitable ) ]
311
+ #[ derive( TyEncodable , TyDecodable , Hash , HashStable , NoopTypeTraversable ) ]
312
312
pub struct MCDCDecisionSpan {
313
313
pub span : Span ,
314
314
pub end_markers : Vec < BlockMarkerId > ,
0 commit comments