diff options
Diffstat (limited to 'crates/ide/src/call_hierarchy.rs')
-rw-r--r-- | crates/ide/src/call_hierarchy.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ide/src/call_hierarchy.rs b/crates/ide/src/call_hierarchy.rs index 60e0cd4ad..3c2d39f5d 100644 --- a/crates/ide/src/call_hierarchy.rs +++ b/crates/ide/src/call_hierarchy.rs | |||
@@ -8,7 +8,7 @@ use ide_db::RootDatabase; | |||
8 | use syntax::{ast, match_ast, AstNode, TextRange}; | 8 | use syntax::{ast, match_ast, AstNode, TextRange}; |
9 | 9 | ||
10 | use crate::{ | 10 | use crate::{ |
11 | display::ToNav, goto_definition, references, FilePosition, NavigationTarget, RangeInfo, | 11 | display::TryToNav, goto_definition, references, FilePosition, NavigationTarget, RangeInfo, |
12 | }; | 12 | }; |
13 | 13 | ||
14 | #[derive(Debug, Clone)] | 14 | #[derive(Debug, Clone)] |
@@ -61,7 +61,7 @@ pub(crate) fn incoming_calls(db: &RootDatabase, position: FilePosition) -> Optio | |||
61 | match node { | 61 | match node { |
62 | ast::Fn(it) => { | 62 | ast::Fn(it) => { |
63 | let def = sema.to_def(&it)?; | 63 | let def = sema.to_def(&it)?; |
64 | Some(def.to_nav(sema.db)) | 64 | def.try_to_nav(sema.db) |
65 | }, | 65 | }, |
66 | _ => None, | 66 | _ => None, |
67 | } | 67 | } |
@@ -99,7 +99,7 @@ pub(crate) fn outgoing_calls(db: &RootDatabase, position: FilePosition) -> Optio | |||
99 | match callable.kind() { | 99 | match callable.kind() { |
100 | hir::CallableKind::Function(it) => { | 100 | hir::CallableKind::Function(it) => { |
101 | let fn_def: hir::Function = it.into(); | 101 | let fn_def: hir::Function = it.into(); |
102 | let nav = fn_def.to_nav(db); | 102 | let nav = fn_def.try_to_nav(db)?; |
103 | Some(nav) | 103 | Some(nav) |
104 | } | 104 | } |
105 | _ => None, | 105 | _ => None, |
@@ -107,7 +107,7 @@ pub(crate) fn outgoing_calls(db: &RootDatabase, position: FilePosition) -> Optio | |||
107 | } | 107 | } |
108 | FnCallNode::MethodCallExpr(expr) => { | 108 | FnCallNode::MethodCallExpr(expr) => { |
109 | let function = sema.resolve_method_call(&expr)?; | 109 | let function = sema.resolve_method_call(&expr)?; |
110 | Some(function.to_nav(db)) | 110 | function.try_to_nav(db) |
111 | } | 111 | } |
112 | } { | 112 | } { |
113 | Some((func_target, name_ref.syntax().text_range())) | 113 | Some((func_target, name_ref.syntax().text_range())) |