From af53d5f4b081ad50d8fe08fc1e107aa6025b2491 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 31 Jul 2020 20:23:52 +0200 Subject: Rename --- crates/ra_ide/src/display/navigation_target.rs | 2 +- crates/ra_ide/src/file_structure.rs | 4 ++-- crates/ra_ide/src/references/rename.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'crates/ra_ide') diff --git a/crates/ra_ide/src/display/navigation_target.rs b/crates/ra_ide/src/display/navigation_target.rs index d70e33e72..fdbf75abd 100644 --- a/crates/ra_ide/src/display/navigation_target.rs +++ b/crates/ra_ide/src/display/navigation_target.rs @@ -253,7 +253,7 @@ impl ToNav for hir::ImplDef { let focus_range = if derive_attr.is_some() { None } else { - src.value.target_type().map(|ty| original_range(db, src.with_value(ty.syntax())).range) + src.value.self_ty().map(|ty| original_range(db, src.with_value(ty.syntax())).range) }; NavigationTarget::from_syntax( diff --git a/crates/ra_ide/src/file_structure.rs b/crates/ra_ide/src/file_structure.rs index ef368651a..87cab4503 100644 --- a/crates/ra_ide/src/file_structure.rs +++ b/crates/ra_ide/src/file_structure.rs @@ -130,8 +130,8 @@ fn structure_node(node: &SyntaxNode) -> Option { ast::Const(it) => decl_with_type_ref(&it, it.ty()), ast::Static(it) => decl_with_type_ref(&it, it.ty()), ast::Impl(it) => { - let target_type = it.target_type()?; - let target_trait = it.target_trait(); + let target_type = it.self_ty()?; + let target_trait = it.trait_(); let label = match target_trait { None => format!("impl {}", target_type.syntax().text()), Some(t) => { diff --git a/crates/ra_ide/src/references/rename.rs b/crates/ra_ide/src/references/rename.rs index 96aed7cc7..3cd6c815b 100644 --- a/crates/ra_ide/src/references/rename.rs +++ b/crates/ra_ide/src/references/rename.rs @@ -194,7 +194,7 @@ fn text_edit_from_self_param( new_name: &str, ) -> Option { fn target_type_name(impl_def: &ast::Impl) -> Option { - if let Some(ast::Type::PathType(p)) = impl_def.target_type() { + if let Some(ast::Type::PathType(p)) = impl_def.self_ty() { return Some(p.path()?.segment()?.name_ref()?.text().to_string()); } None -- cgit v1.2.3