aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/goto_definition.rs
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-01-15 16:06:52 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-01-15 16:06:52 +0000
commit72a4951023f11adfdf0eac353c99d8a01a9471fc (patch)
tree8cca098650d989ea58e6bd4aafd44e5ff85fcee5 /crates/ra_ide_api/src/goto_definition.rs
parent7c977a7dcd2bac3b6148f2428bcb586c6354d775 (diff)
parent18e9a710cd2f2ced84fde19e88d0b967dcb5939e (diff)
Merge #553
553: remove Cancelable from fn_scopes r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide_api/src/goto_definition.rs')
-rw-r--r--crates/ra_ide_api/src/goto_definition.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_ide_api/src/goto_definition.rs b/crates/ra_ide_api/src/goto_definition.rs
index 7229293a4..5d522181b 100644
--- a/crates/ra_ide_api/src/goto_definition.rs
+++ b/crates/ra_ide_api/src/goto_definition.rs
@@ -50,7 +50,7 @@ pub(crate) fn reference_definition(
50 if let Some(function) = 50 if let Some(function) =
51 hir::source_binder::function_from_child_node(db, file_id, name_ref.syntax()) 51 hir::source_binder::function_from_child_node(db, file_id, name_ref.syntax())
52 { 52 {
53 let scope = function.scopes(db)?; 53 let scope = function.scopes(db);
54 // First try to resolve the symbol locally 54 // First try to resolve the symbol locally
55 if let Some(entry) = scope.resolve_local_name(name_ref) { 55 if let Some(entry) = scope.resolve_local_name(name_ref) {
56 let nav = NavigationTarget::from_scope_entry(file_id, &entry); 56 let nav = NavigationTarget::from_scope_entry(file_id, &entry);
@@ -64,7 +64,7 @@ pub(crate) fn reference_definition(
64 .and_then(ast::MethodCallExpr::cast) 64 .and_then(ast::MethodCallExpr::cast)
65 { 65 {
66 let infer_result = function.infer(db)?; 66 let infer_result = function.infer(db)?;
67 let syntax_mapping = function.body_syntax_mapping(db)?; 67 let syntax_mapping = function.body_syntax_mapping(db);
68 let expr = ast::Expr::cast(method_call.syntax()).unwrap(); 68 let expr = ast::Expr::cast(method_call.syntax()).unwrap();
69 if let Some(def_id) = syntax_mapping 69 if let Some(def_id) = syntax_mapping
70 .node_expr(expr) 70 .node_expr(expr)