diff options
Diffstat (limited to 'crates/ra_ide_api')
-rw-r--r-- | crates/ra_ide_api/src/hover.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/ra_ide_api/src/hover.rs b/crates/ra_ide_api/src/hover.rs index 2968b807c..c445d4fa1 100644 --- a/crates/ra_ide_api/src/hover.rs +++ b/crates/ra_ide_api/src/hover.rs | |||
@@ -21,7 +21,11 @@ pub(crate) fn hover( | |||
21 | match ref_result { | 21 | match ref_result { |
22 | Exact(nav) => res.extend(doc_text_for(db, nav)?), | 22 | Exact(nav) => res.extend(doc_text_for(db, nav)?), |
23 | Approximate(navs) => { | 23 | Approximate(navs) => { |
24 | res.push("Failed to exactly resolve the symbol. This is probably because rust_analyzer does not yet support glob imports or traits. \nThese methods were found instead:".to_string()); | 24 | let mut msg = String::from("Failed to exactly resolve the symbol. This is probably because rust_analyzer does not yet support glob imports or traits."); |
25 | if !navs.is_empty() { | ||
26 | msg.push_str(" \nThese items were found instead:"); | ||
27 | } | ||
28 | res.push(msg); | ||
25 | for nav in navs { | 29 | for nav in navs { |
26 | res.extend(doc_text_for(db, nav)?) | 30 | res.extend(doc_text_for(db, nav)?) |
27 | } | 31 | } |