aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src
diff options
context:
space:
mode:
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 }