33use std:: fmt:: { self , Debug , Formatter } ;
44
55use rustc_index:: IndexVec ;
6- use rustc_macros:: { HashStable , TyDecodable , TyEncodable , TypeFoldable , TypeVisitable } ;
6+ use rustc_macros:: { HashStable , NoopTypeTraversable , TyDecodable , TyEncodable } ;
77use rustc_span:: { Span , Symbol } ;
88
99rustc_index:: newtype_index! {
@@ -77,7 +77,7 @@ impl ConditionId {
7777/// but the zero/counter/expression distinction is also useful for representing
7878/// the value of code/gap mappings, and the true/false arms of branch mappings.
7979#[ derive( Copy , Clone , PartialEq , Eq ) ]
80- #[ derive( TyEncodable , TyDecodable , Hash , HashStable , TypeFoldable , TypeVisitable ) ]
80+ #[ derive( TyEncodable , TyDecodable , Hash , HashStable ) ]
8181pub enum CovTerm {
8282 Zero ,
8383 Counter ( CounterId ) ,
@@ -94,7 +94,7 @@ impl Debug for CovTerm {
9494 }
9595}
9696
97- #[ derive( Clone , PartialEq , TyEncodable , TyDecodable , Hash , HashStable , TypeFoldable , TypeVisitable ) ]
97+ #[ derive( Clone , PartialEq , TyEncodable , TyDecodable , Hash , HashStable , NoopTypeTraversable ) ]
9898pub enum CoverageKind {
9999 /// Marks a span that might otherwise not be represented in MIR, so that
100100 /// coverage instrumentation can associate it with its enclosing block/BCB.
@@ -155,8 +155,8 @@ impl Debug for CoverageKind {
155155 }
156156}
157157
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 ) ]
160160pub struct SourceRegion {
161161 pub file_name : Symbol ,
162162 pub start_line : u32 ,
@@ -176,7 +176,7 @@ impl Debug for SourceRegion {
176176}
177177
178178#[ derive( Copy , Clone , Debug , PartialEq , Eq , Hash , HashStable ) ]
179- #[ derive( TyEncodable , TyDecodable , TypeFoldable , TypeVisitable ) ]
179+ #[ derive( TyEncodable , TyDecodable , NoopTypeTraversable ) ]
180180pub enum Op {
181181 Subtract ,
182182 Add ,
@@ -193,15 +193,15 @@ impl Op {
193193}
194194
195195#[ derive( Clone , Debug ) ]
196- #[ derive( TyEncodable , TyDecodable , Hash , HashStable , TypeFoldable , TypeVisitable ) ]
196+ #[ derive( TyEncodable , TyDecodable , Hash , HashStable , NoopTypeTraversable ) ]
197197pub struct Expression {
198198 pub lhs : CovTerm ,
199199 pub op : Op ,
200200 pub rhs : CovTerm ,
201201}
202202
203203#[ derive( Clone , Debug ) ]
204- #[ derive( TyEncodable , TyDecodable , Hash , HashStable , TypeFoldable , TypeVisitable ) ]
204+ #[ derive( TyEncodable , TyDecodable , Hash , HashStable , NoopTypeTraversable ) ]
205205pub enum MappingKind {
206206 /// Associates a normal region of code with a counter/expression/zero.
207207 Code ( CovTerm ) ,
@@ -233,7 +233,7 @@ impl MappingKind {
233233}
234234
235235#[ derive( Clone , Debug ) ]
236- #[ derive( TyEncodable , TyDecodable , Hash , HashStable , TypeFoldable , TypeVisitable ) ]
236+ #[ derive( TyEncodable , TyDecodable , Hash , HashStable , NoopTypeTraversable ) ]
237237pub struct Mapping {
238238 pub kind : MappingKind ,
239239 pub source_region : SourceRegion ,
@@ -243,7 +243,7 @@ pub struct Mapping {
243243/// to be used in conjunction with the individual coverage statements injected
244244/// into the function's basic blocks.
245245#[ derive( Clone , Debug ) ]
246- #[ derive( TyEncodable , TyDecodable , Hash , HashStable , TypeFoldable , TypeVisitable ) ]
246+ #[ derive( TyEncodable , TyDecodable , Hash , HashStable , NoopTypeTraversable ) ]
247247pub struct FunctionCoverageInfo {
248248 pub function_source_hash : u64 ,
249249 pub num_counters : usize ,
@@ -262,7 +262,7 @@ pub struct FunctionCoverageInfo {
262262/// ("Hi" indicates that this is "high-level" information collected at the
263263/// THIR/MIR boundary, before the MIR-based coverage instrumentation pass.)
264264#[ derive( Clone , Debug ) ]
265- #[ derive( TyEncodable , TyDecodable , Hash , HashStable , TypeFoldable , TypeVisitable ) ]
265+ #[ derive( TyEncodable , TyDecodable , Hash , HashStable , NoopTypeTraversable ) ]
266266pub struct CoverageInfoHi {
267267 /// 1 more than the highest-numbered [`CoverageKind::BlockMarker`] that was
268268 /// injected into the MIR body. This makes it possible to allocate per-ID
@@ -276,23 +276,23 @@ pub struct CoverageInfoHi {
276276}
277277
278278#[ derive( Clone , Debug ) ]
279- #[ derive( TyEncodable , TyDecodable , Hash , HashStable , TypeFoldable , TypeVisitable ) ]
279+ #[ derive( TyEncodable , TyDecodable , Hash , HashStable , NoopTypeTraversable ) ]
280280pub struct BranchSpan {
281281 pub span : Span ,
282282 pub true_marker : BlockMarkerId ,
283283 pub false_marker : BlockMarkerId ,
284284}
285285
286286#[ derive( Copy , Clone , Debug ) ]
287- #[ derive( TyEncodable , TyDecodable , Hash , HashStable , TypeFoldable , TypeVisitable ) ]
287+ #[ derive( TyEncodable , TyDecodable , Hash , HashStable , NoopTypeTraversable ) ]
288288pub struct ConditionInfo {
289289 pub condition_id : ConditionId ,
290290 pub true_next_id : Option < ConditionId > ,
291291 pub false_next_id : Option < ConditionId > ,
292292}
293293
294294#[ derive( Clone , Debug ) ]
295- #[ derive( TyEncodable , TyDecodable , Hash , HashStable , TypeFoldable , TypeVisitable ) ]
295+ #[ derive( TyEncodable , TyDecodable , Hash , HashStable , NoopTypeTraversable ) ]
296296pub struct MCDCBranchSpan {
297297 pub span : Span ,
298298 pub condition_info : ConditionInfo ,
@@ -301,14 +301,14 @@ pub struct MCDCBranchSpan {
301301}
302302
303303#[ derive( Copy , Clone , Debug ) ]
304- #[ derive( TyEncodable , TyDecodable , Hash , HashStable , TypeFoldable , TypeVisitable ) ]
304+ #[ derive( TyEncodable , TyDecodable , Hash , HashStable , NoopTypeTraversable ) ]
305305pub struct DecisionInfo {
306306 pub bitmap_idx : u32 ,
307307 pub num_conditions : u16 ,
308308}
309309
310310#[ derive( Clone , Debug ) ]
311- #[ derive( TyEncodable , TyDecodable , Hash , HashStable , TypeFoldable , TypeVisitable ) ]
311+ #[ derive( TyEncodable , TyDecodable , Hash , HashStable , NoopTypeTraversable ) ]
312312pub struct MCDCDecisionSpan {
313313 pub span : Span ,
314314 pub end_markers : Vec < BlockMarkerId > ,
0 commit comments