diff options
Diffstat (limited to 'crates/ra_ide_api/src')
-rw-r--r-- | crates/ra_ide_api/src/completion/complete_dot.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_ide_api/src/completion/complete_dot.rs b/crates/ra_ide_api/src/completion/complete_dot.rs index dc5206a64..f975214e9 100644 --- a/crates/ra_ide_api/src/completion/complete_dot.rs +++ b/crates/ra_ide_api/src/completion/complete_dot.rs | |||
@@ -1,4 +1,4 @@ | |||
1 | use hir::{Ty, AdtDef, TypeName}; | 1 | use hir::{Ty, AdtDef, TypeCtor}; |
2 | 2 | ||
3 | use crate::completion::{CompletionContext, Completions}; | 3 | use crate::completion::{CompletionContext, Completions}; |
4 | 4 | ||
@@ -25,13 +25,13 @@ fn complete_fields(acc: &mut Completions, ctx: &CompletionContext, receiver: Ty) | |||
25 | for receiver in receiver.autoderef(ctx.db) { | 25 | for receiver in receiver.autoderef(ctx.db) { |
26 | match receiver { | 26 | match receiver { |
27 | Ty::Apply(a_ty) => match a_ty.name { | 27 | Ty::Apply(a_ty) => match a_ty.name { |
28 | TypeName::Adt(AdtDef::Struct(s)) => { | 28 | TypeCtor::Adt(AdtDef::Struct(s)) => { |
29 | for field in s.fields(ctx.db) { | 29 | for field in s.fields(ctx.db) { |
30 | acc.add_field(ctx, field, &a_ty.parameters); | 30 | acc.add_field(ctx, field, &a_ty.parameters); |
31 | } | 31 | } |
32 | } | 32 | } |
33 | // TODO unions | 33 | // TODO unions |
34 | TypeName::Tuple => { | 34 | TypeCtor::Tuple => { |
35 | for (i, ty) in a_ty.parameters.iter().enumerate() { | 35 | for (i, ty) in a_ty.parameters.iter().enumerate() { |
36 | acc.add_pos_field(ctx, i, ty); | 36 | acc.add_pos_field(ctx, i, ty); |
37 | } | 37 | } |