aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-07-10 13:08:35 +0100
committerAleksey Kladov <[email protected]>2020-07-10 13:08:35 +0100
commitb85042601d69d1c592b731430ef0e445c39fda56 (patch)
tree74d4a37d0127446bb4725ee9f1d3eea05e7601a3 /crates/ra_hir_def/src
parent5fa8f8e3761363098c80e11842682dffcee171d8 (diff)
Goto type definition works for self
Diffstat (limited to 'crates/ra_hir_def/src')
-rw-r--r--crates/ra_hir_def/src/body.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/crates/ra_hir_def/src/body.rs b/crates/ra_hir_def/src/body.rs
index 4f2350915..031ffe13f 100644
--- a/crates/ra_hir_def/src/body.rs
+++ b/crates/ra_hir_def/src/body.rs
@@ -302,6 +302,11 @@ impl BodySourceMap {
302 self.pat_map.get(&src).cloned() 302 self.pat_map.get(&src).cloned()
303 } 303 }
304 304
305 pub fn node_self_param(&self, node: InFile<&ast::SelfParam>) -> Option<PatId> {
306 let src = node.map(|it| Either::Right(AstPtr::new(it)));
307 self.pat_map.get(&src).cloned()
308 }
309
305 pub fn field_syntax(&self, expr: ExprId, field: usize) -> InFile<AstPtr<ast::RecordField>> { 310 pub fn field_syntax(&self, expr: ExprId, field: usize) -> InFile<AstPtr<ast::RecordField>> {
306 self.field_map[&(expr, field)].clone() 311 self.field_map[&(expr, field)].clone()
307 } 312 }