aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists/src/utils.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_assists/src/utils.rs')
-rw-r--r--crates/ra_assists/src/utils.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/ra_assists/src/utils.rs b/crates/ra_assists/src/utils.rs
index 6be704ce3..2f15a3f15 100644
--- a/crates/ra_assists/src/utils.rs
+++ b/crates/ra_assists/src/utils.rs
@@ -13,7 +13,7 @@ use rustc_hash::FxHashSet;
13 13
14pub(crate) use insert_use::insert_use_statement; 14pub(crate) use insert_use::insert_use_statement;
15 15
16pub fn get_missing_impl_items( 16pub fn get_missing_assoc_items(
17 sema: &Semantics<RootDatabase>, 17 sema: &Semantics<RootDatabase>,
18 impl_def: &ast::ImplDef, 18 impl_def: &ast::ImplDef,
19) -> Vec<hir::AssocItem> { 19) -> Vec<hir::AssocItem> {
@@ -23,21 +23,21 @@ pub fn get_missing_impl_items(
23 let mut impl_type = FxHashSet::default(); 23 let mut impl_type = FxHashSet::default();
24 24
25 if let Some(item_list) = impl_def.item_list() { 25 if let Some(item_list) = impl_def.item_list() {
26 for item in item_list.impl_items() { 26 for item in item_list.assoc_items() {
27 match item { 27 match item {
28 ast::ImplItem::FnDef(f) => { 28 ast::AssocItem::FnDef(f) => {
29 if let Some(n) = f.name() { 29 if let Some(n) = f.name() {
30 impl_fns_consts.insert(n.syntax().to_string()); 30 impl_fns_consts.insert(n.syntax().to_string());
31 } 31 }
32 } 32 }
33 33
34 ast::ImplItem::TypeAliasDef(t) => { 34 ast::AssocItem::TypeAliasDef(t) => {
35 if let Some(n) = t.name() { 35 if let Some(n) = t.name() {
36 impl_type.insert(n.syntax().to_string()); 36 impl_type.insert(n.syntax().to_string());
37 } 37 }
38 } 38 }
39 39
40 ast::ImplItem::ConstDef(c) => { 40 ast::AssocItem::ConstDef(c) => {
41 if let Some(n) = c.name() { 41 if let Some(n) = c.name() {
42 impl_fns_consts.insert(n.syntax().to_string()); 42 impl_fns_consts.insert(n.syntax().to_string());
43 } 43 }