aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_assists')
-rw-r--r--crates/ra_assists/src/assists/add_new.rs2
-rw-r--r--crates/ra_assists/src/assists/fill_match_arms.rs2
-rw-r--r--crates/ra_assists/src/test_db.rs1
3 files changed, 2 insertions, 3 deletions
diff --git a/crates/ra_assists/src/assists/add_new.rs b/crates/ra_assists/src/assists/add_new.rs
index b5f8afb4e..ee8bff346 100644
--- a/crates/ra_assists/src/assists/add_new.rs
+++ b/crates/ra_assists/src/assists/add_new.rs
@@ -36,7 +36,7 @@ pub(crate) fn add_new(ctx: AssistCtx<impl HirDatabase>) -> Option<Assist> {
36 36
37 // We want to only apply this to non-union structs with named fields 37 // We want to only apply this to non-union structs with named fields
38 let field_list = match (strukt.kind(), strukt.is_union()) { 38 let field_list = match (strukt.kind(), strukt.is_union()) {
39 (StructKind::Named(named), false) => named, 39 (StructKind::Record(named), false) => named,
40 _ => return None, 40 _ => return None,
41 }; 41 };
42 42
diff --git a/crates/ra_assists/src/assists/fill_match_arms.rs b/crates/ra_assists/src/assists/fill_match_arms.rs
index 9354466d9..8482897c5 100644
--- a/crates/ra_assists/src/assists/fill_match_arms.rs
+++ b/crates/ra_assists/src/assists/fill_match_arms.rs
@@ -101,7 +101,7 @@ fn build_pat(var: ast::EnumVariant) -> Option<ast::Pat> {
101 iter::repeat(make::placeholder_pat().into()).take(field_list.fields().count()); 101 iter::repeat(make::placeholder_pat().into()).take(field_list.fields().count());
102 make::tuple_struct_pat(path, pats).into() 102 make::tuple_struct_pat(path, pats).into()
103 } 103 }
104 ast::StructKind::Named(field_list) => { 104 ast::StructKind::Record(field_list) => {
105 let pats = field_list.fields().map(|f| make::bind_pat(f.name().unwrap()).into()); 105 let pats = field_list.fields().map(|f| make::bind_pat(f.name().unwrap()).into());
106 make::record_pat(path, pats).into() 106 make::record_pat(path, pats).into()
107 } 107 }
diff --git a/crates/ra_assists/src/test_db.rs b/crates/ra_assists/src/test_db.rs
index 5be7383ed..5f96c974b 100644
--- a/crates/ra_assists/src/test_db.rs
+++ b/crates/ra_assists/src/test_db.rs
@@ -10,7 +10,6 @@ use ra_db::{salsa, CrateId, FileId, FileLoader, FileLoaderDelegate, RelativePath
10 hir::db::InternDatabaseStorage, 10 hir::db::InternDatabaseStorage,
11 hir::db::AstDatabaseStorage, 11 hir::db::AstDatabaseStorage,
12 hir::db::DefDatabaseStorage, 12 hir::db::DefDatabaseStorage,
13 hir::db::DefDatabase2Storage,
14 hir::db::HirDatabaseStorage 13 hir::db::HirDatabaseStorage
15)] 14)]
16#[derive(Debug, Default)] 15#[derive(Debug, Default)]