diff options
Diffstat (limited to 'crates/ra_ide_api/src/display.rs')
-rw-r--r-- | crates/ra_ide_api/src/display.rs | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/crates/ra_ide_api/src/display.rs b/crates/ra_ide_api/src/display.rs index f11af0a0b..882518838 100644 --- a/crates/ra_ide_api/src/display.rs +++ b/crates/ra_ide_api/src/display.rs | |||
@@ -13,6 +13,7 @@ pub use structure::{StructureNode, file_structure}; | |||
13 | pub use function_signature::FunctionSignature; | 13 | pub use function_signature::FunctionSignature; |
14 | 14 | ||
15 | pub(crate) use short_label::ShortLabel; | 15 | pub(crate) use short_label::ShortLabel; |
16 | pub(crate) use navigation_target::{docs_from_symbol, description_from_symbol}; | ||
16 | 17 | ||
17 | pub(crate) fn function_label(node: &ast::FnDef) -> String { | 18 | pub(crate) fn function_label(node: &ast::FnDef) -> String { |
18 | FunctionSignature::from(node).to_string() | 19 | FunctionSignature::from(node).to_string() |
@@ -72,13 +73,3 @@ where | |||
72 | format!("```rust\n{}\n```", val.as_ref()) | 73 | format!("```rust\n{}\n```", val.as_ref()) |
73 | } | 74 | } |
74 | } | 75 | } |
75 | |||
76 | // FIXME: this should not really use navigation target. Rather, approximately | ||
77 | // resolved symbol should return a `DefId`. | ||
78 | pub(crate) fn doc_text_for(nav: NavigationTarget) -> Option<String> { | ||
79 | match (nav.description(), nav.docs()) { | ||
80 | (Some(desc), docs) => Some(rust_code_markup_with_doc(desc, docs)), | ||
81 | (None, Some(docs)) => Some(docs.to_string()), | ||
82 | _ => None, | ||
83 | } | ||
84 | } | ||