aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide_api/src')
-rw-r--r--crates/ra_ide_api/src/completion/complete_path.rs10
-rw-r--r--crates/ra_ide_api/src/db.rs1
2 files changed, 5 insertions, 6 deletions
diff --git a/crates/ra_ide_api/src/completion/complete_path.rs b/crates/ra_ide_api/src/completion/complete_path.rs
index e72586e2e..e3f1d42f8 100644
--- a/crates/ra_ide_api/src/completion/complete_path.rs
+++ b/crates/ra_ide_api/src/completion/complete_path.rs
@@ -27,18 +27,18 @@ pub(super) fn complete_path(acc: &mut Completions, ctx: &CompletionContext) {
27 } 27 }
28 } 28 }
29 hir::ModuleDef::Enum(e) => { 29 hir::ModuleDef::Enum(e) => {
30 e.variants(ctx.db) 30 e.variants(ctx.db).into_iter().for_each(|variant| {
31 .into_iter() 31 if let Some(name) = variant.name(ctx.db) {
32 .for_each(|(variant_name, variant)| {
33 CompletionItem::new( 32 CompletionItem::new(
34 CompletionKind::Reference, 33 CompletionKind::Reference,
35 ctx.source_range(), 34 ctx.source_range(),
36 variant_name.to_string(), 35 name.to_string(),
37 ) 36 )
38 .kind(CompletionItemKind::EnumVariant) 37 .kind(CompletionItemKind::EnumVariant)
39 .set_documentation(variant.docs(ctx.db)) 38 .set_documentation(variant.docs(ctx.db))
40 .add_to(acc) 39 .add_to(acc)
41 }); 40 }
41 });
42 } 42 }
43 _ => return, 43 _ => return,
44 }; 44 };
diff --git a/crates/ra_ide_api/src/db.rs b/crates/ra_ide_api/src/db.rs
index bff6b7237..11305613c 100644
--- a/crates/ra_ide_api/src/db.rs
+++ b/crates/ra_ide_api/src/db.rs
@@ -104,7 +104,6 @@ salsa::database_storage! {
104 fn type_for_field() for hir::db::TypeForFieldQuery; 104 fn type_for_field() for hir::db::TypeForFieldQuery;
105 fn struct_data() for hir::db::StructDataQuery; 105 fn struct_data() for hir::db::StructDataQuery;
106 fn enum_data() for hir::db::EnumDataQuery; 106 fn enum_data() for hir::db::EnumDataQuery;
107 fn enum_variant_data() for hir::db::EnumVariantDataQuery;
108 fn impls_in_module() for hir::db::ImplsInModuleQuery; 107 fn impls_in_module() for hir::db::ImplsInModuleQuery;
109 fn impls_in_crate() for hir::db::ImplsInCrateQuery; 108 fn impls_in_crate() for hir::db::ImplsInCrateQuery;
110 fn body_hir() for hir::db::BodyHirQuery; 109 fn body_hir() for hir::db::BodyHirQuery;