aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src
diff options
context:
space:
mode:
authorJeremy A. Kolb <[email protected]>2019-01-25 17:51:36 +0000
committerJeremy A. Kolb <[email protected]>2019-01-25 17:51:36 +0000
commit65885791165c42b48fa2deaed32c4f35c17c62f5 (patch)
treea89ba72dcfe621767a14c1af07df535f98eb3cfb /crates/ra_hir/src
parentbce0c6267aab2e8ca33a3e78a1081736abbc1373 (diff)
Add module documentation support
Diffstat (limited to 'crates/ra_hir/src')
-rw-r--r--crates/ra_hir/src/code_model_api.rs7
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
180impl 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)]
181pub struct StructField { 188pub struct StructField {
182 parent: VariantDef, 189 parent: VariantDef,