diff options
Diffstat (limited to 'crates/ra_hir_def/src/lib.rs')
-rw-r--r-- | crates/ra_hir_def/src/lib.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/crates/ra_hir_def/src/lib.rs b/crates/ra_hir_def/src/lib.rs index 5e46db1aa..a82de7dec 100644 --- a/crates/ra_hir_def/src/lib.rs +++ b/crates/ra_hir_def/src/lib.rs | |||
@@ -95,7 +95,7 @@ impl_intern_key!(StructId); | |||
95 | 95 | ||
96 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 96 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
97 | pub struct StructLoc { | 97 | pub struct StructLoc { |
98 | pub container: ModuleId, | 98 | pub container: ContainerId, |
99 | pub ast_id: AstId<ast::StructDef>, | 99 | pub ast_id: AstId<ast::StructDef>, |
100 | } | 100 | } |
101 | 101 | ||
@@ -119,7 +119,7 @@ impl_intern_key!(UnionId); | |||
119 | 119 | ||
120 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 120 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
121 | pub struct UnionLoc { | 121 | pub struct UnionLoc { |
122 | pub container: ModuleId, | 122 | pub container: ContainerId, |
123 | pub ast_id: AstId<ast::UnionDef>, | 123 | pub ast_id: AstId<ast::UnionDef>, |
124 | } | 124 | } |
125 | 125 | ||
@@ -143,7 +143,7 @@ impl_intern_key!(EnumId); | |||
143 | 143 | ||
144 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 144 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
145 | pub struct EnumLoc { | 145 | pub struct EnumLoc { |
146 | pub container: ModuleId, | 146 | pub container: ContainerId, |
147 | pub ast_id: AstId<ast::EnumDef>, | 147 | pub ast_id: AstId<ast::EnumDef>, |
148 | } | 148 | } |
149 | 149 | ||
@@ -529,6 +529,7 @@ impl HasModule for AdtId { | |||
529 | AdtId::UnionId(it) => it.lookup(db).container, | 529 | AdtId::UnionId(it) => it.lookup(db).container, |
530 | AdtId::EnumId(it) => it.lookup(db).container, | 530 | AdtId::EnumId(it) => it.lookup(db).container, |
531 | } | 531 | } |
532 | .module(db) | ||
532 | } | 533 | } |
533 | } | 534 | } |
534 | 535 | ||
@@ -550,7 +551,7 @@ impl HasModule for GenericDefId { | |||
550 | GenericDefId::TraitId(it) => it.lookup(db).container, | 551 | GenericDefId::TraitId(it) => it.lookup(db).container, |
551 | GenericDefId::TypeAliasId(it) => it.lookup(db).module(db), | 552 | GenericDefId::TypeAliasId(it) => it.lookup(db).module(db), |
552 | GenericDefId::ImplId(it) => it.lookup(db).container, | 553 | GenericDefId::ImplId(it) => it.lookup(db).container, |
553 | GenericDefId::EnumVariantId(it) => it.parent.lookup(db).container, | 554 | GenericDefId::EnumVariantId(it) => it.parent.lookup(db).container.module(db), |
554 | GenericDefId::ConstId(it) => it.lookup(db).module(db), | 555 | GenericDefId::ConstId(it) => it.lookup(db).module(db), |
555 | } | 556 | } |
556 | } | 557 | } |