diff options
Diffstat (limited to 'crates/hir_def')
-rw-r--r-- | crates/hir_def/src/item_scope.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/hir_def/src/item_scope.rs b/crates/hir_def/src/item_scope.rs index 1b7cb7c8b..0d364b1cb 100644 --- a/crates/hir_def/src/item_scope.rs +++ b/crates/hir_def/src/item_scope.rs | |||
@@ -6,6 +6,7 @@ use std::collections::hash_map::Entry; | |||
6 | use base_db::CrateId; | 6 | use base_db::CrateId; |
7 | use hir_expand::{name::Name, AstId, MacroCallId, MacroDefKind}; | 7 | use hir_expand::{name::Name, AstId, MacroCallId, MacroDefKind}; |
8 | use once_cell::sync::Lazy; | 8 | use once_cell::sync::Lazy; |
9 | use profile::Count; | ||
9 | use rustc_hash::{FxHashMap, FxHashSet}; | 10 | use rustc_hash::{FxHashMap, FxHashSet}; |
10 | use stdx::format_to; | 11 | use stdx::format_to; |
11 | use syntax::ast; | 12 | use syntax::ast; |
@@ -30,6 +31,8 @@ pub struct PerNsGlobImports { | |||
30 | 31 | ||
31 | #[derive(Debug, Default, PartialEq, Eq)] | 32 | #[derive(Debug, Default, PartialEq, Eq)] |
32 | pub struct ItemScope { | 33 | pub struct ItemScope { |
34 | _c: Count<Self>, | ||
35 | |||
33 | /// Defs visible in this scope. This includes `declarations`, but also | 36 | /// Defs visible in this scope. This includes `declarations`, but also |
34 | /// imports. | 37 | /// imports. |
35 | types: FxHashMap<Name, (ModuleDefId, Visibility)>, | 38 | types: FxHashMap<Name, (ModuleDefId, Visibility)>, |
@@ -311,6 +314,7 @@ impl ItemScope { | |||
311 | pub(crate) fn shrink_to_fit(&mut self) { | 314 | pub(crate) fn shrink_to_fit(&mut self) { |
312 | // Exhaustive match to require handling new fields. | 315 | // Exhaustive match to require handling new fields. |
313 | let Self { | 316 | let Self { |
317 | _c: _, | ||
314 | types, | 318 | types, |
315 | values, | 319 | values, |
316 | macros, | 320 | macros, |