aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide')
-rw-r--r--crates/ra_ide/src/display/navigation_target.rs2
-rw-r--r--crates/ra_ide/src/file_structure.rs4
-rw-r--r--crates/ra_ide/src/references/rename.rs2
3 files changed, 4 insertions, 4 deletions
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 {
253 let focus_range = if derive_attr.is_some() { 253 let focus_range = if derive_attr.is_some() {
254 None 254 None
255 } else { 255 } else {
256 src.value.target_type().map(|ty| original_range(db, src.with_value(ty.syntax())).range) 256 src.value.self_ty().map(|ty| original_range(db, src.with_value(ty.syntax())).range)
257 }; 257 };
258 258
259 NavigationTarget::from_syntax( 259 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<StructureNode> {
130 ast::Const(it) => decl_with_type_ref(&it, it.ty()), 130 ast::Const(it) => decl_with_type_ref(&it, it.ty()),
131 ast::Static(it) => decl_with_type_ref(&it, it.ty()), 131 ast::Static(it) => decl_with_type_ref(&it, it.ty()),
132 ast::Impl(it) => { 132 ast::Impl(it) => {
133 let target_type = it.target_type()?; 133 let target_type = it.self_ty()?;
134 let target_trait = it.target_trait(); 134 let target_trait = it.trait_();
135 let label = match target_trait { 135 let label = match target_trait {
136 None => format!("impl {}", target_type.syntax().text()), 136 None => format!("impl {}", target_type.syntax().text()),
137 Some(t) => { 137 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(
194 new_name: &str, 194 new_name: &str,
195) -> Option<TextEdit> { 195) -> Option<TextEdit> {
196 fn target_type_name(impl_def: &ast::Impl) -> Option<String> { 196 fn target_type_name(impl_def: &ast::Impl) -> Option<String> {
197 if let Some(ast::Type::PathType(p)) = impl_def.target_type() { 197 if let Some(ast::Type::PathType(p)) = impl_def.self_ty() {
198 return Some(p.path()?.segment()?.name_ref()?.text().to_string()); 198 return Some(p.path()?.segment()?.name_ref()?.text().to_string());
199 } 199 }
200 None 200 None