diff options
Diffstat (limited to 'crates/ra_hir/src')
-rw-r--r-- | crates/ra_hir/src/code_model_api.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/crates/ra_hir/src/code_model_api.rs b/crates/ra_hir/src/code_model_api.rs index fdea5be57..1e88bff8b 100644 --- a/crates/ra_hir/src/code_model_api.rs +++ b/crates/ra_hir/src/code_model_api.rs | |||
@@ -177,6 +177,13 @@ impl Module { | |||
177 | } | 177 | } |
178 | } | 178 | } |
179 | 179 | ||
180 | impl Docs for Module { | ||
181 | fn docs(&self, db: &impl HirDatabase) -> Option<Documentation> { | ||
182 | self.declaration_source(db) | ||
183 | .and_then(|it| docs_from_ast(&*it.1)) | ||
184 | } | ||
185 | } | ||
186 | |||
180 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] | 187 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] |
181 | pub struct StructField { | 188 | pub struct StructField { |
182 | pub(crate) parent: VariantDef, | 189 | pub(crate) parent: VariantDef, |