Skip to content

Commit 977b6e2

Browse files
committed
Arena-allocate hir::Lifetime.
This shrinks `hir::Ty` from 72 to 48 bytes. `visit_lifetime` is added to the HIR stats collector because these types are now stored in memory on their own, instead of being within other types.
1 parent 567e1bb commit 977b6e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_utils/src/hir_utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -929,7 +929,7 @@ impl<'a, 'tcx> SpanlessHash<'a, 'tcx> {
929929
}
930930
}
931931

932-
pub fn hash_lifetime(&mut self, lifetime: Lifetime) {
932+
pub fn hash_lifetime(&mut self, lifetime: &Lifetime) {
933933
std::mem::discriminant(&lifetime.name).hash(&mut self.s);
934934
if let LifetimeName::Param(param_id, ref name) = lifetime.name {
935935
std::mem::discriminant(name).hash(&mut self.s);

0 commit comments

Comments
 (0)