diff options
Diffstat (limited to 'crates/ra_ide_api/src/completion/complete_record_literal.rs')
-rw-r--r-- | crates/ra_ide_api/src/completion/complete_record_literal.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/crates/ra_ide_api/src/completion/complete_record_literal.rs b/crates/ra_ide_api/src/completion/complete_record_literal.rs index 45a4a9738..577c394d2 100644 --- a/crates/ra_ide_api/src/completion/complete_record_literal.rs +++ b/crates/ra_ide_api/src/completion/complete_record_literal.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 | /// Complete fields in fields literals. | 5 | /// Complete fields in fields literals. |
@@ -15,10 +13,9 @@ pub(super) fn complete_record_literal(acc: &mut Completions, ctx: &CompletionCon | |||
15 | Some(it) => it, | 13 | Some(it) => it, |
16 | _ => return, | 14 | _ => return, |
17 | }; | 15 | }; |
18 | let substs = &ty.substs().unwrap_or_else(Substs::empty); | ||
19 | 16 | ||
20 | for field in variant.fields(ctx.db) { | 17 | for (field, field_ty) in ty.variant_fields(ctx.db, variant) { |
21 | acc.add_field(ctx, field, substs); | 18 | acc.add_field(ctx, field, &field_ty); |
22 | } | 19 | } |
23 | } | 20 | } |
24 | 21 | ||