@@ -54,7 +54,7 @@ pub enum Applicability {
54
54
/// Expected `Diagnostic`s get the lint level `Expect` which stores the `LintExpectationId`
55
55
/// to match it with the actual expectation later on.
56
56
///
57
- /// The `LintExpectationId` has to be has stable between compilations, as diagnostic
57
+ /// The `LintExpectationId` has to be stable between compilations, as diagnostic
58
58
/// instances might be loaded from cache. Lint messages can be emitted during an
59
59
/// `EarlyLintPass` operating on the AST and during a `LateLintPass` traversing the
60
60
/// HIR tree. The AST doesn't have enough information to create a stable id. The
@@ -71,7 +71,7 @@ pub enum Applicability {
71
71
#[ derive( Clone , Copy , PartialEq , PartialOrd , Eq , Ord , Debug , Hash , Encodable , Decodable ) ]
72
72
pub enum LintExpectationId {
73
73
/// Used for lints emitted during the `EarlyLintPass`. This id is not
74
- /// has stable and should not be cached.
74
+ /// hash stable and should not be cached.
75
75
Unstable { attr_id : AttrId , lint_index : Option < u16 > } ,
76
76
/// The [`HirId`] that the lint expectation is attached to. This id is
77
77
/// stable and can be cached. The additional index ensures that nodes with
@@ -113,7 +113,9 @@ impl<HCX: rustc_hir::HashStableContext> HashStable<HCX> for LintExpectationId {
113
113
lint_index. hash_stable ( hcx, hasher) ;
114
114
}
115
115
_ => {
116
- unreachable ! ( "HashStable should only be called for a filled `LintExpectationId`" )
116
+ unreachable ! (
117
+ "HashStable should only be called for filled and stable `LintExpectationId`"
118
+ )
117
119
}
118
120
}
119
121
}
0 commit comments