diff options
author | Aleksey Kladov <[email protected]> | 2019-03-02 13:59:18 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-03-02 13:59:18 +0000 |
commit | 8fc08d36e33ad95d70d262cef7d2e694f7f8f502 (patch) | |
tree | ac8a3c42e334f1c9b5207de9b0c6ba55c8838c83 /crates/ra_ide_api/src | |
parent | 03b2ab8e1f11f0e05234da9162ef57f7a30a64af (diff) |
remove second way to get the body
Diffstat (limited to 'crates/ra_ide_api/src')
-rw-r--r-- | crates/ra_ide_api/src/goto_definition.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_ide_api/src/goto_definition.rs b/crates/ra_ide_api/src/goto_definition.rs index 1f284af56..9ec179593 100644 --- a/crates/ra_ide_api/src/goto_definition.rs +++ b/crates/ra_ide_api/src/goto_definition.rs | |||
@@ -109,7 +109,7 @@ pub(crate) fn reference_definition( | |||
109 | Some(Resolution::Def(def)) => return Exact(NavigationTarget::from_def(db, def)), | 109 | Some(Resolution::Def(def)) => return Exact(NavigationTarget::from_def(db, def)), |
110 | Some(Resolution::LocalBinding(pat)) => { | 110 | Some(Resolution::LocalBinding(pat)) => { |
111 | let body = resolver.body().expect("no body for local binding"); | 111 | let body = resolver.body().expect("no body for local binding"); |
112 | let source_map = body.source_map(db); | 112 | let source_map = body.owner().body_source_map(db); |
113 | let ptr = source_map.pat_syntax(pat).expect("pattern not found in syntax mapping"); | 113 | let ptr = source_map.pat_syntax(pat).expect("pattern not found in syntax mapping"); |
114 | let name = | 114 | let name = |
115 | path.as_ident().cloned().expect("local binding from a multi-segment path"); | 115 | path.as_ident().cloned().expect("local binding from a multi-segment path"); |