From 2d799cf5e0ffd414ce47d8b9478148f98b46028a Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Mon, 18 Jan 2021 18:40:06 +0100 Subject: shrink_to_fit `TokenMap`'s backing storage --- crates/hir_expand/src/hygiene.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'crates/hir_expand') diff --git a/crates/hir_expand/src/hygiene.rs b/crates/hir_expand/src/hygiene.rs index 8db581b77..c8ea81210 100644 --- a/crates/hir_expand/src/hygiene.rs +++ b/crates/hir_expand/src/hygiene.rs @@ -76,6 +76,8 @@ pub struct HygieneFrame { impl HygieneFrames { fn new(db: &dyn AstDatabase, file_id: HirFileId) -> Self { + // Note that this intentionally avoids the `hygiene_frame` query to avoid blowing up memory + // usage. The query is only helpful for nested `HygieneFrame`s as it avoids redundant work. HygieneFrames(Arc::new(HygieneFrame::new(db, file_id))) } -- cgit v1.2.3