diff options
author | Jonas Schievink <[email protected]> | 2021-01-18 17:40:06 +0000 |
---|---|---|
committer | Jonas Schievink <[email protected]> | 2021-01-18 17:40:06 +0000 |
commit | 2d799cf5e0ffd414ce47d8b9478148f98b46028a (patch) | |
tree | cd9ef812cb400cdba2ea691e07e3cfb8a6d55944 /crates/hir_expand | |
parent | 9daba961f236750c3a5d831c9775606271b37eff (diff) |
shrink_to_fit `TokenMap`'s backing storage
Diffstat (limited to 'crates/hir_expand')
-rw-r--r-- | crates/hir_expand/src/hygiene.rs | 2 |
1 files changed, 2 insertions, 0 deletions
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 { | |||
76 | 76 | ||
77 | impl HygieneFrames { | 77 | impl HygieneFrames { |
78 | fn new(db: &dyn AstDatabase, file_id: HirFileId) -> Self { | 78 | fn new(db: &dyn AstDatabase, file_id: HirFileId) -> Self { |
79 | // Note that this intentionally avoids the `hygiene_frame` query to avoid blowing up memory | ||
80 | // usage. The query is only helpful for nested `HygieneFrame`s as it avoids redundant work. | ||
79 | HygieneFrames(Arc::new(HygieneFrame::new(db, file_id))) | 81 | HygieneFrames(Arc::new(HygieneFrame::new(db, file_id))) |
80 | } | 82 | } |
81 | 83 | ||