diff options
Diffstat (limited to 'crates/ra_ide_api/src/completion/complete_record_pattern.rs')
-rw-r--r-- | crates/ra_ide_api/src/completion/complete_record_pattern.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/crates/ra_ide_api/src/completion/complete_record_pattern.rs b/crates/ra_ide_api/src/completion/complete_record_pattern.rs index aa0fd6d24..a56c7e3a1 100644 --- a/crates/ra_ide_api/src/completion/complete_record_pattern.rs +++ b/crates/ra_ide_api/src/completion/complete_record_pattern.rs | |||
@@ -1,7 +1,5 @@ | |||
1 | //! FIXME: write short doc here | 1 | //! FIXME: write short doc here |
2 | 2 | ||
3 | use hir::Substs; | ||
4 | |||
5 | use crate::completion::{CompletionContext, Completions}; | 3 | use crate::completion::{CompletionContext, Completions}; |
6 | 4 | ||
7 | pub(super) fn complete_record_pattern(acc: &mut Completions, ctx: &CompletionContext) { | 5 | pub(super) fn complete_record_pattern(acc: &mut Completions, ctx: &CompletionContext) { |
@@ -14,10 +12,9 @@ pub(super) fn complete_record_pattern(acc: &mut Completions, ctx: &CompletionCon | |||
14 | Some(it) => it, | 12 | Some(it) => it, |
15 | _ => return, | 13 | _ => return, |
16 | }; | 14 | }; |
17 | let substs = &ty.substs().unwrap_or_else(Substs::empty); | ||
18 | 15 | ||
19 | for field in variant.fields(ctx.db) { | 16 | for (field, field_ty) in ty.variant_fields(ctx.db, variant) { |
20 | acc.add_field(ctx, field, substs); | 17 | acc.add_field(ctx, field, &field_ty); |
21 | } | 18 | } |
22 | } | 19 | } |
23 | 20 | ||