diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-05-05 17:13:57 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-05-05 17:13:57 +0100 |
commit | 58f64313fdbb215b29cceb843e06d2c1541d9f56 (patch) | |
tree | 0c95a20510f832ec5f208a1ede39f8aad8ffcd86 /crates/ra_assists/src/handlers/add_new.rs | |
parent | 756e91732b7a92d9156f5c1d8ffcaf5155cf4680 (diff) | |
parent | 92665358cd98913e3fef8294e1889cc0bb919e3f (diff) |
Merge #4321
4321: Rename ImplItem to AssocItem r=matklad a=edwin0cheng
Related discussion: https://github.com/rust-analyzer/rust-analyzer/pull/4283#discussion_r419352265
Co-authored-by: Edwin Cheng <[email protected]>
Diffstat (limited to 'crates/ra_assists/src/handlers/add_new.rs')
-rw-r--r-- | crates/ra_assists/src/handlers/add_new.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_assists/src/handlers/add_new.rs b/crates/ra_assists/src/handlers/add_new.rs index 0f9174a29..e8a36c7de 100644 --- a/crates/ra_assists/src/handlers/add_new.rs +++ b/crates/ra_assists/src/handlers/add_new.rs | |||
@@ -162,8 +162,8 @@ fn find_struct_impl(ctx: &AssistCtx, strukt: &ast::StructDef) -> Option<Option<a | |||
162 | 162 | ||
163 | fn has_new_fn(imp: &ast::ImplDef) -> bool { | 163 | fn has_new_fn(imp: &ast::ImplDef) -> bool { |
164 | if let Some(il) = imp.item_list() { | 164 | if let Some(il) = imp.item_list() { |
165 | for item in il.impl_items() { | 165 | for item in il.assoc_items() { |
166 | if let ast::ImplItem::FnDef(f) = item { | 166 | if let ast::AssocItem::FnDef(f) = item { |
167 | if let Some(name) = f.name() { | 167 | if let Some(name) = f.name() { |
168 | if name.text().eq_ignore_ascii_case("new") { | 168 | if name.text().eq_ignore_ascii_case("new") { |
169 | return true; | 169 | return true; |