diff options
Diffstat (limited to 'crates/ra_hir/src')
-rw-r--r-- | crates/ra_hir/src/expr.rs | 4 |
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() |