diff options
author | Jeremy A. Kolb <[email protected]> | 2019-01-25 17:51:36 +0000 |
---|---|---|
committer | Jeremy A. Kolb <[email protected]> | 2019-01-25 17:51:36 +0000 |
commit | 65885791165c42b48fa2deaed32c4f35c17c62f5 (patch) | |
tree | a89ba72dcfe621767a14c1af07df535f98eb3cfb /crates/ra_hir/src | |
parent | bce0c6267aab2e8ca33a3e78a1081736abbc1373 (diff) |
Add module documentation support
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 118562984..5a05b5822 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 | parent: VariantDef, | 189 | parent: VariantDef, |