aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/item_tree
diff options
context:
space:
mode:
authorJonas Schievink <[email protected]>2021-04-05 02:32:43 +0100
committerJonas Schievink <[email protected]>2021-04-05 02:32:43 +0100
commitadcf18e27dc04b60fede859f3d6c22b99d4fd513 (patch)
treee2c8e86b17a89cc9e2f6ebd874d8cc30fe5f4e64 /crates/hir_def/src/item_tree
parent24e876b52ed76710593895bc37bb8ed303075193 (diff)
Add `GenericParams::shrink_to_fit`
Reduces memory usage by over 10 MB
Diffstat (limited to 'crates/hir_def/src/item_tree')
-rw-r--r--crates/hir_def/src/item_tree/lower.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/crates/hir_def/src/item_tree/lower.rs b/crates/hir_def/src/item_tree/lower.rs
index ab7ad8310..0c8112dda 100644
--- a/crates/hir_def/src/item_tree/lower.rs
+++ b/crates/hir_def/src/item_tree/lower.rs
@@ -739,6 +739,7 @@ impl Ctx {
739 } 739 }
740 } 740 }
741 741
742 generics.shrink_to_fit();
742 self.data().generics.alloc(generics) 743 self.data().generics.alloc(generics)
743 } 744 }
744 745