aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-01-25 17:55:29 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-01-25 17:55:29 +0000
commitcc73d3ccbc6bc066e7580ece0e64808c8c8056e7 (patch)
treedcb396d86fff5fe40c6360030706c2181dd6562e /crates/ra_hir/src
parentdaaba4be17cae9ee32a2e151e256ef71f600814e (diff)
parent65885791165c42b48fa2deaed32c4f35c17c62f5 (diff)
Merge #646
646: Add module documentation support r=matklad a=kjeremy Co-authored-by: Jeremy A. Kolb <[email protected]>
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 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
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 pub(crate) parent: VariantDef, 189 pub(crate) parent: VariantDef,