diff options
Diffstat (limited to 'crates/ra_hir/src/code_model.rs')
-rw-r--r-- | crates/ra_hir/src/code_model.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs index 8833750c8..0295eb948 100644 --- a/crates/ra_hir/src/code_model.rs +++ b/crates/ra_hir/src/code_model.rs | |||
@@ -865,6 +865,10 @@ impl GenericParam { | |||
865 | let params = db.generic_params(self.id.parent); | 865 | let params = db.generic_params(self.id.parent); |
866 | params.params[self.id.local_id].name.clone() | 866 | params.params[self.id.local_id].name.clone() |
867 | } | 867 | } |
868 | |||
869 | pub fn module(self, db: &impl HirDatabase) -> Module { | ||
870 | self.id.parent.module(db).into() | ||
871 | } | ||
868 | } | 872 | } |
869 | 873 | ||
870 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] | 874 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] |