diff options
Diffstat (limited to 'crates/ra_hir/src/code_model.rs')
-rw-r--r-- | crates/ra_hir/src/code_model.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs index a9615a3b7..034fb7cfa 100644 --- a/crates/ra_hir/src/code_model.rs +++ b/crates/ra_hir/src/code_model.rs | |||
@@ -778,8 +778,7 @@ impl GenericDef { | |||
778 | 778 | ||
779 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] | 779 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] |
780 | pub struct Local { | 780 | pub struct Local { |
781 | // TODO: ID, | 781 | pub(crate) parent: DefWithBodyId, |
782 | pub(crate) parent: DefWithBody, | ||
783 | pub(crate) pat_id: PatId, | 782 | pub(crate) pat_id: PatId, |
784 | } | 783 | } |
785 | 784 | ||
@@ -808,11 +807,11 @@ impl Local { | |||
808 | } | 807 | } |
809 | 808 | ||
810 | pub fn parent(self, _db: &impl HirDatabase) -> DefWithBody { | 809 | pub fn parent(self, _db: &impl HirDatabase) -> DefWithBody { |
811 | self.parent | 810 | self.parent.into() |
812 | } | 811 | } |
813 | 812 | ||
814 | pub fn module(self, db: &impl HirDatabase) -> Module { | 813 | pub fn module(self, db: &impl HirDatabase) -> Module { |
815 | self.parent.module(db) | 814 | self.parent(db).module(db) |
816 | } | 815 | } |
817 | 816 | ||
818 | pub fn ty(self, db: &impl HirDatabase) -> Type { | 817 | pub fn ty(self, db: &impl HirDatabase) -> Type { |