diff options
Diffstat (limited to 'crates/hir_def/src/lib.rs')
-rw-r--r-- | crates/hir_def/src/lib.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/hir_def/src/lib.rs b/crates/hir_def/src/lib.rs index 4498d94bb..ab3b17f6c 100644 --- a/crates/hir_def/src/lib.rs +++ b/crates/hir_def/src/lib.rs | |||
@@ -286,11 +286,11 @@ pub enum ContainerId { | |||
286 | 286 | ||
287 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] | 287 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] |
288 | pub enum AssocContainerId { | 288 | pub enum AssocContainerId { |
289 | ContainerId(ContainerId), | 289 | ModuleId(ModuleId), |
290 | ImplId(ImplId), | 290 | ImplId(ImplId), |
291 | TraitId(TraitId), | 291 | TraitId(TraitId), |
292 | } | 292 | } |
293 | impl_from!(ContainerId for AssocContainerId); | 293 | impl_from!(ModuleId for AssocContainerId); |
294 | 294 | ||
295 | /// A Data Type | 295 | /// A Data Type |
296 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)] | 296 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)] |
@@ -459,7 +459,7 @@ impl HasModule for ContainerId { | |||
459 | impl HasModule for AssocContainerId { | 459 | impl HasModule for AssocContainerId { |
460 | fn module(&self, db: &dyn db::DefDatabase) -> ModuleId { | 460 | fn module(&self, db: &dyn db::DefDatabase) -> ModuleId { |
461 | match *self { | 461 | match *self { |
462 | AssocContainerId::ContainerId(it) => it.module(db), | 462 | AssocContainerId::ModuleId(it) => it, |
463 | AssocContainerId::ImplId(it) => it.lookup(db).container.module(db), | 463 | AssocContainerId::ImplId(it) => it.lookup(db).container.module(db), |
464 | AssocContainerId::TraitId(it) => it.lookup(db).container.module(db), | 464 | AssocContainerId::TraitId(it) => it.lookup(db).container.module(db), |
465 | } | 465 | } |