Skip to content

Commit

Permalink
Hash discriminant of Lifetime::Name
Browse files Browse the repository at this point in the history
  • Loading branch information
xd009642 committed Jul 27, 2019
1 parent bba2c7f commit ad63719
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion clippy_lints/src/utils/hir_utils.rs
Expand Up @@ -584,14 +584,15 @@ impl<'a, 'tcx> SpanlessHash<'a, 'tcx> {

pub fn hash_lifetime(&mut self, lifetime: &Lifetime) {
if let LifetimeName::Param(ref name) = lifetime.name {
std::mem::discriminant(&name).hash(&mut self.s);
match name {
ParamName::Plain(ref ident) => {
ident.name.hash(&mut self.s);
},
ParamName::Fresh(ref size) => {
size.hash(&mut self.s);
},
_ => {},
ParamName::Error => {},
}
}
}
Expand Down

0 comments on commit ad63719

Please sign in to comment.