Hash discriminant of lifetime.name

This commit is contained in:
xd009642 2019-07-27 23:04:36 +01:00
parent ad637193f0
commit 03c543515a

View File

@ -583,6 +583,7 @@ impl<'a, 'tcx> SpanlessHash<'a, 'tcx> {
}
pub fn hash_lifetime(&mut self, lifetime: &Lifetime) {
std::mem::discriminant(&lifetime.name).hash(&mut self.s);
if let LifetimeName::Param(ref name) = lifetime.name {
std::mem::discriminant(&name).hash(&mut self.s);
match name {