aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src
diff options
context:
space:
mode:
authorPascal Hertleif <[email protected]>2019-01-13 12:32:52 +0000
committerPascal Hertleif <[email protected]>2019-01-13 12:32:52 +0000
commit7f16f922da0ed2c231e34239e1de39994d0740a1 (patch)
tree9161d7d467861fcf254fcbb60538829a0f5400aa /crates/ra_ide_api/src
parent9f2072d45fefb326679197715ebf0e40d64dad2e (diff)
Tweak message shown for query fallback
Small tweak for #518
Diffstat (limited to 'crates/ra_ide_api/src')
-rw-r--r--crates/ra_ide_api/src/hover.rs6
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 }