From 8fc08d36e33ad95d70d262cef7d2e694f7f8f502 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 2 Mar 2019 16:59:18 +0300 Subject: remove second way to get the body --- crates/ra_ide_api/src/goto_definition.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_ide_api/src') 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( Some(Resolution::Def(def)) => return Exact(NavigationTarget::from_def(db, def)), Some(Resolution::LocalBinding(pat)) => { let body = resolver.body().expect("no body for local binding"); - let source_map = body.source_map(db); + let source_map = body.owner().body_source_map(db); let ptr = source_map.pat_syntax(pat).expect("pattern not found in syntax mapping"); let name = path.as_ident().cloned().expect("local binding from a multi-segment path"); -- cgit v1.2.3