diff options
Diffstat (limited to 'crates/ra_assists/src/utils.rs')
-rw-r--r-- | crates/ra_assists/src/utils.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/ra_assists/src/utils.rs b/crates/ra_assists/src/utils.rs index 27c33df23..bb16ebd4e 100644 --- a/crates/ra_assists/src/utils.rs +++ b/crates/ra_assists/src/utils.rs | |||
@@ -56,7 +56,7 @@ pub(crate) fn render_snippet(_cap: SnippetCap, node: &SyntaxNode, cursor: Cursor | |||
56 | 56 | ||
57 | pub fn get_missing_assoc_items( | 57 | pub fn get_missing_assoc_items( |
58 | sema: &Semantics<RootDatabase>, | 58 | sema: &Semantics<RootDatabase>, |
59 | impl_def: &ast::ImplDef, | 59 | impl_def: &ast::Impl, |
60 | ) -> Vec<hir::AssocItem> { | 60 | ) -> Vec<hir::AssocItem> { |
61 | // Names must be unique between constants and functions. However, type aliases | 61 | // Names must be unique between constants and functions. However, type aliases |
62 | // may share the same name as a function or constant. | 62 | // may share the same name as a function or constant. |
@@ -66,19 +66,19 @@ pub fn get_missing_assoc_items( | |||
66 | if let Some(item_list) = impl_def.assoc_item_list() { | 66 | if let Some(item_list) = impl_def.assoc_item_list() { |
67 | for item in item_list.assoc_items() { | 67 | for item in item_list.assoc_items() { |
68 | match item { | 68 | match item { |
69 | ast::AssocItem::FnDef(f) => { | 69 | ast::AssocItem::Fn(f) => { |
70 | if let Some(n) = f.name() { | 70 | if let Some(n) = f.name() { |
71 | impl_fns_consts.insert(n.syntax().to_string()); | 71 | impl_fns_consts.insert(n.syntax().to_string()); |
72 | } | 72 | } |
73 | } | 73 | } |
74 | 74 | ||
75 | ast::AssocItem::TypeAliasDef(t) => { | 75 | ast::AssocItem::TypeAlias(t) => { |
76 | if let Some(n) = t.name() { | 76 | if let Some(n) = t.name() { |
77 | impl_type.insert(n.syntax().to_string()); | 77 | impl_type.insert(n.syntax().to_string()); |
78 | } | 78 | } |
79 | } | 79 | } |
80 | 80 | ||
81 | ast::AssocItem::ConstDef(c) => { | 81 | ast::AssocItem::Const(c) => { |
82 | if let Some(n) = c.name() { | 82 | if let Some(n) = c.name() { |
83 | impl_fns_consts.insert(n.syntax().to_string()); | 83 | impl_fns_consts.insert(n.syntax().to_string()); |
84 | } | 84 | } |
@@ -109,7 +109,7 @@ pub fn get_missing_assoc_items( | |||
109 | 109 | ||
110 | pub(crate) fn resolve_target_trait( | 110 | pub(crate) fn resolve_target_trait( |
111 | sema: &Semantics<RootDatabase>, | 111 | sema: &Semantics<RootDatabase>, |
112 | impl_def: &ast::ImplDef, | 112 | impl_def: &ast::Impl, |
113 | ) -> Option<hir::Trait> { | 113 | ) -> Option<hir::Trait> { |
114 | let ast_path = impl_def | 114 | let ast_path = impl_def |
115 | .target_trait() | 115 | .target_trait() |