aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src
diff options
context:
space:
mode:
authorVille Penttinen <[email protected]>2019-03-12 07:24:46 +0000
committerVille Penttinen <[email protected]>2019-04-09 12:45:04 +0100
commit0e49abb7fbe9239b97f0b7168ec359014c63f8c0 (patch)
treeb76168a2cf9f09336e446dcc584879a918681055 /crates/ra_hir/src
parent5f700179fc7ed16d2848a6dbc7cf23da3b8df6c7 (diff)
Refactor CallInfo function signatures to new FunctionSignature type
This is used by CallInfo to create a pretty printed function signature that can be used with completions and other places as well.
Diffstat (limited to 'crates/ra_hir/src')
-rw-r--r--crates/ra_hir/src/docs.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/ra_hir/src/docs.rs b/crates/ra_hir/src/docs.rs
index 5db72c08a..e3a755b46 100644
--- a/crates/ra_hir/src/docs.rs
+++ b/crates/ra_hir/src/docs.rs
@@ -22,6 +22,12 @@ impl Into<String> for Documentation {
22 } 22 }
23} 23}
24 24
25impl<'a> Into<String> for &'a Documentation {
26 fn into(self) -> String {
27 self.contents().into()
28 }
29}
30
25pub trait Docs { 31pub trait Docs {
26 fn docs(&self, db: &impl HirDatabase) -> Option<Documentation>; 32 fn docs(&self, db: &impl HirDatabase) -> Option<Documentation>;
27} 33}