aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/goto_definition.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide_api/src/goto_definition.rs')
-rw-r--r--crates/ra_ide_api/src/goto_definition.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/crates/ra_ide_api/src/goto_definition.rs b/crates/ra_ide_api/src/goto_definition.rs
index 660b43cfa..60c1f5085 100644
--- a/crates/ra_ide_api/src/goto_definition.rs
+++ b/crates/ra_ide_api/src/goto_definition.rs
@@ -113,6 +113,7 @@ pub(crate) fn reference_definition(
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");
116 let ptr = ptr.either(|it| it.into(), |it| it.into());
116 let nav = NavigationTarget::from_scope_entry(file_id, name, ptr); 117 let nav = NavigationTarget::from_scope_entry(file_id, name, ptr);
117 return Exact(nav); 118 return Exact(nav);
118 } 119 }