Skip to content

Commit ad63719

Browse files
committed
Hash discriminant of Lifetime::Name
1 parent bba2c7f commit ad63719

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clippy_lints/src/utils/hir_utils.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,14 +584,15 @@ impl<'a, 'tcx> SpanlessHash<'a, 'tcx> {
584584

585585
pub fn hash_lifetime(&mut self, lifetime: &Lifetime) {
586586
if let LifetimeName::Param(ref name) = lifetime.name {
587+
std::mem::discriminant(&name).hash(&mut self.s);
587588
match name {
588589
ParamName::Plain(ref ident) => {
589590
ident.name.hash(&mut self.s);
590591
},
591592
ParamName::Fresh(ref size) => {
592593
size.hash(&mut self.s);
593594
},
594-
_ => {},
595+
ParamName::Error => {},
595596
}
596597
}
597598
}

0 commit comments

Comments
 (0)