aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-01-08 08:47:28 +0000
committerAleksey Kladov <[email protected]>2019-01-08 08:47:28 +0000
commit3ffd5dd2a63e8efe182e79439a879ec1f9420b77 (patch)
tree5a674d9b89081a371f07b5a0c0a21f0b71d7e75a /crates/ra_hir
parentda0b348ae9f629c5cbe4a836a90ed85e36ca18e5 (diff)
migrate ra_analysis to new rowan
Diffstat (limited to 'crates/ra_hir')
-rw-r--r--crates/ra_hir/src/expr.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir/src/expr.rs b/crates/ra_hir/src/expr.rs
index 49c1a231b..4c54449ef 100644
--- a/crates/ra_hir/src/expr.rs
+++ b/crates/ra_hir/src/expr.rs
@@ -77,7 +77,7 @@ impl BodySyntaxMapping {
77 pub fn syntax_expr(&self, ptr: LocalSyntaxPtr) -> Option<ExprId> { 77 pub fn syntax_expr(&self, ptr: LocalSyntaxPtr) -> Option<ExprId> {
78 self.expr_syntax_mapping.get(&ptr).cloned() 78 self.expr_syntax_mapping.get(&ptr).cloned()
79 } 79 }
80 pub fn node_expr(&self, node: ast::Expr) -> Option<ExprId> { 80 pub fn node_expr(&self, node: &ast::Expr) -> Option<ExprId> {
81 self.expr_syntax_mapping 81 self.expr_syntax_mapping
82 .get(&LocalSyntaxPtr::new(node.syntax())) 82 .get(&LocalSyntaxPtr::new(node.syntax()))
83 .cloned() 83 .cloned()
@@ -88,7 +88,7 @@ impl BodySyntaxMapping {
88 pub fn syntax_pat(&self, ptr: LocalSyntaxPtr) -> Option<PatId> { 88 pub fn syntax_pat(&self, ptr: LocalSyntaxPtr) -> Option<PatId> {
89 self.pat_syntax_mapping.get(&ptr).cloned() 89 self.pat_syntax_mapping.get(&ptr).cloned()
90 } 90 }
91 pub fn node_pat(&self, node: ast::Pat) -> Option<PatId> { 91 pub fn node_pat(&self, node: &ast::Pat) -> Option<PatId> {
92 self.pat_syntax_mapping 92 self.pat_syntax_mapping
93 .get(&LocalSyntaxPtr::new(node.syntax())) 93 .get(&LocalSyntaxPtr::new(node.syntax()))
94 .cloned() 94 .cloned()