mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-10 23:06:23 +00:00
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>
This commit is contained in:
commit
bd2658de26
@ -21,7 +21,11 @@ pub(crate) fn hover(
|
||||
match ref_result {
|
||||
Exact(nav) => res.extend(doc_text_for(db, nav)?),
|
||||
Approximate(navs) => {
|
||||
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());
|
||||
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.");
|
||||
if !navs.is_empty() {
|
||||
msg.push_str(" \nThese items were found instead:");
|
||||
}
|
||||
res.push(msg);
|
||||
for nav in navs {
|
||||
res.extend(doc_text_for(db, nav)?)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user