aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/expr.rs
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2019-01-29 19:49:31 +0000
committerFlorian Diebold <[email protected]>2019-02-01 21:45:43 +0000
commitafce8e442639fa9ed954b3659a2d1eccb7d80113 (patch)
tree38015aa82986dc69f5b60cfb21fe6062a37d8006 /crates/ra_hir/src/expr.rs
parent33ff7b56ff353410e7bcb7aed27004d4f0a57d8e (diff)
Use the new Resolver API for goto def
Diffstat (limited to 'crates/ra_hir/src/expr.rs')
-rw-r--r--crates/ra_hir/src/expr.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/ra_hir/src/expr.rs b/crates/ra_hir/src/expr.rs
index 6c294bf10..e78ba889e 100644
--- a/crates/ra_hir/src/expr.rs
+++ b/crates/ra_hir/src/expr.rs
@@ -69,6 +69,10 @@ impl Body {
69 pub fn owner(&self) -> Function { 69 pub fn owner(&self) -> Function {
70 self.owner 70 self.owner
71 } 71 }
72
73 pub fn syntax_mapping(&self, db: &impl HirDatabase) -> Arc<BodySyntaxMapping> {
74 db.body_syntax_mapping(self.owner)
75 }
72} 76}
73 77
74// needs arbitrary_self_types to be a method... or maybe move to the def? 78// needs arbitrary_self_types to be a method... or maybe move to the def?