Skip to content

Commit bd2658d

Browse files
bors[bot]killercup
andcommitted
Merge #522
522: Tweak message shown for query fallback r=DJMcNab a=killercup Small tweak for #518 Co-authored-by: Pascal Hertleif <killercup@gmail.com>
2 parents 9f2072d + 7f16f92 commit bd2658d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

crates/ra_ide_api/src/hover.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ pub(crate) fn hover(
2121
match ref_result {
2222
Exact(nav) => res.extend(doc_text_for(db, nav)?),
2323
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);
2529
for nav in navs {
2630
res.extend(doc_text_for(db, nav)?)
2731
}

0 commit comments

Comments
 (0)