diff options
Diffstat (limited to 'crates/ra_ide_api/src/completion/complete_path.rs')
-rw-r--r-- | crates/ra_ide_api/src/completion/complete_path.rs | 8 |
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 @@ | |||
1 | use hir::{AdtDef, Either, Resolution}; | 1 | use hir::{Adt, Either, Resolution}; |
2 | use ra_syntax::AstNode; | 2 | use ra_syntax::AstNode; |
3 | use test_utils::tested_by; | 3 | use 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 | }; |