aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/item_scope.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_def/src/item_scope.rs')
-rw-r--r--crates/hir_def/src/item_scope.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/crates/hir_def/src/item_scope.rs b/crates/hir_def/src/item_scope.rs
index f3ebe7c72..4ddfd9ee6 100644
--- a/crates/hir_def/src/item_scope.rs
+++ b/crates/hir_def/src/item_scope.rs
@@ -285,6 +285,17 @@ impl ItemScope {
285 buf.push('\n'); 285 buf.push('\n');
286 } 286 }
287 } 287 }
288
289 pub(crate) fn shrink_to_fit(&mut self) {
290 self.types.shrink_to_fit();
291 self.values.shrink_to_fit();
292 self.macros.shrink_to_fit();
293 self.unresolved.shrink_to_fit();
294 self.defs.shrink_to_fit();
295 self.impls.shrink_to_fit();
296 self.unnamed_trait_imports.shrink_to_fit();
297 self.legacy_macros.shrink_to_fit();
298 }
288} 299}
289 300
290impl PerNs { 301impl PerNs {