Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide/src/hover/render.rs')
-rw-r--r--crates/ide/src/hover/render.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ide/src/hover/render.rs b/crates/ide/src/hover/render.rs
index feac5fff84..15ea92d1c6 100644
--- a/crates/ide/src/hover/render.rs
+++ b/crates/ide/src/hover/render.rs
@@ -272,9 +272,9 @@ pub(super) fn struct_rest_pat(
edition: Edition,
display_target: DisplayTarget,
) -> HoverResult {
- let missing_fields = sema.record_pattern_missing_fields(pattern);
+ let matched_fields = sema.record_pattern_matched_fields(pattern);
- // if there are no missing fields, the end result is a hover that shows ".."
+ // if there are no matched fields, the end result is a hover that shows ".."
// should be left in to indicate that there are no more fields in the pattern
// example, S {a: 1, b: 2, ..} when struct S {a: u32, b: u32}
@@ -285,13 +285,13 @@ pub(super) fn struct_rest_pat(
targets.push(item);
}
};
- for (_, t) in &missing_fields {
+ for (_, t) in &matched_fields {
walk_and_push_ty(sema.db, t, &mut push_new_def);
}
res.markup = {
let mut s = String::from(".., ");
- for (f, _) in &missing_fields {
+ for (f, _) in &matched_fields {
s += f.display(sema.db, display_target).to_string().as_ref();
s += ", ";
}