aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/completion/complete_dot.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-09-12 22:35:28 +0100
committerGitHub <[email protected]>2019-09-12 22:35:28 +0100
commit1adf0519bcc8286c06e12aa7e5b16298addfea4a (patch)
tree3fe7cb05dc4d92d19ecbb87bfafc4a9ff202153e /crates/ra_ide_api/src/completion/complete_dot.rs
parentd8b621cf26b59ff5ae9379b50fc822590b6a3a4e (diff)
parent114a1b878e95c20490af574550ea0825b7a8f9d1 (diff)
Merge #1835
1835: rename AdtDef -> Adt r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide_api/src/completion/complete_dot.rs')
-rw-r--r--crates/ra_ide_api/src/completion/complete_dot.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_ide_api/src/completion/complete_dot.rs b/crates/ra_ide_api/src/completion/complete_dot.rs
index 2325cdf08..9e64c8659 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 @@
1use hir::{AdtDef, Ty, TypeCtor}; 1use hir::{Adt, Ty, TypeCtor};
2 2
3use crate::completion::completion_item::CompletionKind; 3use crate::completion::completion_item::CompletionKind;
4use crate::{ 4use crate::{
@@ -37,7 +37,7 @@ fn complete_fields(acc: &mut Completions, ctx: &CompletionContext, receiver: Ty)
37 for receiver in ctx.analyzer.autoderef(ctx.db, receiver) { 37 for receiver in ctx.analyzer.autoderef(ctx.db, receiver) {
38 if let Ty::Apply(a_ty) = receiver { 38 if let Ty::Apply(a_ty) = receiver {
39 match a_ty.ctor { 39 match a_ty.ctor {
40 TypeCtor::Adt(AdtDef::Struct(s)) => { 40 TypeCtor::Adt(Adt::Struct(s)) => {
41 for field in s.fields(ctx.db) { 41 for field in s.fields(ctx.db) {
42 acc.add_field(ctx, field, &a_ty.parameters); 42 acc.add_field(ctx, field, &a_ty.parameters);
43 } 43 }