@@ -51,13 +51,13 @@ impl LintLevelSource {
51
51
/// A tuple of a lint level and its source.
52
52
pub type LevelAndSource = ( Level , LintLevelSource ) ;
53
53
54
- #[ derive( Debug ) ]
54
+ #[ derive( Debug , HashStable ) ]
55
55
pub struct LintLevelSets {
56
56
pub list : Vec < LintSet > ,
57
57
pub lint_cap : Level ,
58
58
}
59
59
60
- #[ derive( Debug ) ]
60
+ #[ derive( Debug , HashStable ) ]
61
61
pub enum LintSet {
62
62
CommandLine {
63
63
// -A,-W,-D flags, a `Symbol` for the flag itself and `Level` for which
@@ -180,29 +180,7 @@ impl<'a> HashStable<StableHashingContext<'a>> for LintLevelMap {
180
180
181
181
id_to_set. hash_stable ( hcx, hasher) ;
182
182
183
- let LintLevelSets { ref list, lint_cap } = * sets;
184
-
185
- lint_cap. hash_stable ( hcx, hasher) ;
186
-
187
- hcx. while_hashing_spans ( true , |hcx| {
188
- list. len ( ) . hash_stable ( hcx, hasher) ;
189
-
190
- // We are working under the assumption here that the list of
191
- // lint-sets is built in a deterministic order.
192
- for lint_set in list {
193
- :: std:: mem:: discriminant ( lint_set) . hash_stable ( hcx, hasher) ;
194
-
195
- match * lint_set {
196
- LintSet :: CommandLine { ref specs } => {
197
- specs. hash_stable ( hcx, hasher) ;
198
- }
199
- LintSet :: Node { ref specs, parent } => {
200
- specs. hash_stable ( hcx, hasher) ;
201
- parent. hash_stable ( hcx, hasher) ;
202
- }
203
- }
204
- }
205
- } )
183
+ hcx. while_hashing_spans ( true , |hcx| sets. hash_stable ( hcx, hasher) )
206
184
}
207
185
}
208
186
0 commit comments