diff options
author | Florian Diebold <[email protected]> | 2019-01-05 21:37:59 +0000 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2019-01-05 23:29:36 +0000 |
commit | 8e3e5ab2c81f238ea4e731f55eac79b74d9d84c3 (patch) | |
tree | e0388878b4d94ae71fbf82d3e3163c49c8e69c16 /crates/ra_analysis/src/goto_defenition.rs | |
parent | 136aba1cf32646278c4034541ee415f656f8bb5e (diff) |
Make FnScopes use hir::Expr
This was a bit complicated. I've added a wrapper type for now that does the
LocalSyntaxPtr <-> ExprId translation; we might want to get rid of that or give
it a nicer interface.
Diffstat (limited to 'crates/ra_analysis/src/goto_defenition.rs')
-rw-r--r-- | crates/ra_analysis/src/goto_defenition.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_analysis/src/goto_defenition.rs b/crates/ra_analysis/src/goto_defenition.rs index e37421f8d..68b6ac3ba 100644 --- a/crates/ra_analysis/src/goto_defenition.rs +++ b/crates/ra_analysis/src/goto_defenition.rs | |||
@@ -28,7 +28,7 @@ pub(crate) fn reference_defenition( | |||
28 | if let Some(fn_descr) = | 28 | if let Some(fn_descr) = |
29 | hir::source_binder::function_from_child_node(db, file_id, name_ref.syntax())? | 29 | hir::source_binder::function_from_child_node(db, file_id, name_ref.syntax())? |
30 | { | 30 | { |
31 | let scope = fn_descr.scopes(db); | 31 | let scope = fn_descr.scopes(db)?; |
32 | // First try to resolve the symbol locally | 32 | // First try to resolve the symbol locally |
33 | if let Some(entry) = scope.resolve_local_name(name_ref) { | 33 | if let Some(entry) = scope.resolve_local_name(name_ref) { |
34 | let nav = NavigationTarget { | 34 | let nav = NavigationTarget { |