aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src/docs.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_def/src/docs.rs')
-rw-r--r--crates/ra_hir_def/src/docs.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/crates/ra_hir_def/src/docs.rs b/crates/ra_hir_def/src/docs.rs
index 69846fd1b..90a8627bc 100644
--- a/crates/ra_hir_def/src/docs.rs
+++ b/crates/ra_hir_def/src/docs.rs
@@ -1,4 +1,7 @@
1//! FIXME: write short doc here 1//! Defines hir documentation.
2//!
3//! This really shouldn't exist, instead, we should deshugar doc comments into attributes, see
4//! https://github.com/rust-analyzer/rust-analyzer/issues/2148#issuecomment-550519102
2 5
3use std::sync::Arc; 6use std::sync::Arc;
4 7
@@ -52,10 +55,10 @@ impl Documentation {
52 let src = it.parent.child_source(db); 55 let src = it.parent.child_source(db);
53 docs_from_ast(&src.value[it.local_id]) 56 docs_from_ast(&src.value[it.local_id])
54 } 57 }
55 AttrDefId::StaticId(it) => docs_from_ast(&it.source(db).value),
56 AttrDefId::TraitId(it) => docs_from_ast(&it.source(db).value), 58 AttrDefId::TraitId(it) => docs_from_ast(&it.source(db).value),
57 AttrDefId::MacroDefId(it) => docs_from_ast(&it.ast_id.to_node(db)), 59 AttrDefId::MacroDefId(it) => docs_from_ast(&it.ast_id.to_node(db)),
58 AttrDefId::ConstId(it) => docs_from_ast(&it.lookup(db).source(db).value), 60 AttrDefId::ConstId(it) => docs_from_ast(&it.lookup(db).source(db).value),
61 AttrDefId::StaticId(it) => docs_from_ast(&it.lookup(db).source(db).value),
59 AttrDefId::FunctionId(it) => docs_from_ast(&it.lookup(db).source(db).value), 62 AttrDefId::FunctionId(it) => docs_from_ast(&it.lookup(db).source(db).value),
60 AttrDefId::TypeAliasId(it) => docs_from_ast(&it.lookup(db).source(db).value), 63 AttrDefId::TypeAliasId(it) => docs_from_ast(&it.lookup(db).source(db).value),
61 AttrDefId::ImplId(_) => None, 64 AttrDefId::ImplId(_) => None,