aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/completion/complete_path.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-09-12 22:34:52 +0100
committerAleksey Kladov <[email protected]>2019-09-12 22:34:52 +0100
commit114a1b878e95c20490af574550ea0825b7a8f9d1 (patch)
tree3fe7cb05dc4d92d19ecbb87bfafc4a9ff202153e /crates/ra_ide_api/src/completion/complete_path.rs
parentbcf30d389c3744ab517372431eb7e1e1dfcc50df (diff)
rename AdtDef -> Adt
Diffstat (limited to 'crates/ra_ide_api/src/completion/complete_path.rs')
-rw-r--r--crates/ra_ide_api/src/completion/complete_path.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_ide_api/src/completion/complete_path.rs b/crates/ra_ide_api/src/completion/complete_path.rs
index df14f465a..4d3414f33 100644
--- a/crates/ra_ide_api/src/completion/complete_path.rs
+++ b/crates/ra_ide_api/src/completion/complete_path.rs
@@ -1,4 +1,4 @@
1use hir::{AdtDef, Either, Resolution}; 1use hir::{Adt, Either, Resolution};
2use ra_syntax::AstNode; 2use ra_syntax::AstNode;
3use test_utils::tested_by; 3use test_utils::tested_by;
4 4
@@ -37,14 +37,14 @@ pub(super) fn complete_path(acc: &mut Completions, ctx: &CompletionContext) {
37 acc.add_resolution(ctx, name.to_string(), &res.def.map(hir::Resolution::Def)); 37 acc.add_resolution(ctx, name.to_string(), &res.def.map(hir::Resolution::Def));
38 } 38 }
39 } 39 }
40 hir::ModuleDef::AdtDef(_) | hir::ModuleDef::TypeAlias(_) => { 40 hir::ModuleDef::Adt(_) | hir::ModuleDef::TypeAlias(_) => {
41 if let hir::ModuleDef::AdtDef(AdtDef::Enum(e)) = def { 41 if let hir::ModuleDef::Adt(Adt::Enum(e)) = def {
42 for variant in e.variants(ctx.db) { 42 for variant in e.variants(ctx.db) {
43 acc.add_enum_variant(ctx, variant); 43 acc.add_enum_variant(ctx, variant);
44 } 44 }
45 } 45 }
46 let ty = match def { 46 let ty = match def {
47 hir::ModuleDef::AdtDef(adt) => adt.ty(ctx.db), 47 hir::ModuleDef::Adt(adt) => adt.ty(ctx.db),
48 hir::ModuleDef::TypeAlias(a) => a.ty(ctx.db), 48 hir::ModuleDef::TypeAlias(a) => a.ty(ctx.db),
49 _ => unreachable!(), 49 _ => unreachable!(),
50 }; 50 };