diff options
Diffstat (limited to 'crates/ra_hir_def/src/resolver.rs')
-rw-r--r-- | crates/ra_hir_def/src/resolver.rs | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/crates/ra_hir_def/src/resolver.rs b/crates/ra_hir_def/src/resolver.rs index 2694c0438..af9d194f8 100644 --- a/crates/ra_hir_def/src/resolver.rs +++ b/crates/ra_hir_def/src/resolver.rs | |||
@@ -17,9 +17,9 @@ use crate::{ | |||
17 | nameres::{BuiltinShadowMode, CrateDefMap}, | 17 | nameres::{BuiltinShadowMode, CrateDefMap}, |
18 | path::{ModPath, PathKind}, | 18 | path::{ModPath, PathKind}, |
19 | per_ns::PerNs, | 19 | per_ns::PerNs, |
20 | AdtId, ConstId, ContainerId, DefWithBodyId, EnumId, EnumVariantId, FunctionId, GenericDefId, | 20 | AdtId, AssocContainerId, ConstId, ContainerId, DefWithBodyId, EnumId, EnumVariantId, |
21 | HasModule, ImplId, LocalModuleId, Lookup, ModuleDefId, ModuleId, StaticId, StructId, TraitId, | 21 | FunctionId, GenericDefId, HasModule, ImplId, LocalModuleId, Lookup, ModuleDefId, ModuleId, |
22 | TypeAliasId, TypeParamId, VariantId, | 22 | StaticId, StructId, TraitId, TypeAliasId, TypeParamId, VariantId, |
23 | }; | 23 | }; |
24 | 24 | ||
25 | #[derive(Debug, Clone, Default)] | 25 | #[derive(Debug, Clone, Default)] |
@@ -583,9 +583,18 @@ impl HasResolver for DefWithBodyId { | |||
583 | impl HasResolver for ContainerId { | 583 | impl HasResolver for ContainerId { |
584 | fn resolver(self, db: &impl DefDatabase) -> Resolver { | 584 | fn resolver(self, db: &impl DefDatabase) -> Resolver { |
585 | match self { | 585 | match self { |
586 | ContainerId::TraitId(it) => it.resolver(db), | ||
587 | ContainerId::ImplId(it) => it.resolver(db), | ||
588 | ContainerId::ModuleId(it) => it.resolver(db), | 586 | ContainerId::ModuleId(it) => it.resolver(db), |
587 | ContainerId::DefWithBodyId(it) => it.resolver(db), | ||
588 | } | ||
589 | } | ||
590 | } | ||
591 | |||
592 | impl HasResolver for AssocContainerId { | ||
593 | fn resolver(self, db: &impl DefDatabase) -> Resolver { | ||
594 | match self { | ||
595 | AssocContainerId::ContainerId(it) => it.resolver(db), | ||
596 | AssocContainerId::TraitId(it) => it.resolver(db), | ||
597 | AssocContainerId::ImplId(it) => it.resolver(db), | ||
589 | } | 598 | } |
590 | } | 599 | } |
591 | } | 600 | } |