From c1244c853c6bdc42bf91a77768963c0d287093ff Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 11 Apr 2020 00:27:00 +0200 Subject: Forward compat --- crates/ra_hir_def/src/body.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/ra_hir_def/src/body.rs') diff --git a/crates/ra_hir_def/src/body.rs b/crates/ra_hir_def/src/body.rs index 5f9d53ecb..e09996c6f 100644 --- a/crates/ra_hir_def/src/body.rs +++ b/crates/ra_hir_def/src/body.rs @@ -236,7 +236,7 @@ impl Index for Body { impl BodySourceMap { pub fn expr_syntax(&self, expr: ExprId) -> Result { - self.expr_map_back[expr] + self.expr_map_back[expr].clone() } pub fn node_expr(&self, node: InFile<&ast::Expr>) -> Option { @@ -255,7 +255,7 @@ impl BodySourceMap { } pub fn pat_syntax(&self, pat: PatId) -> Result { - self.pat_map_back[pat] + self.pat_map_back[pat].clone() } pub fn node_pat(&self, node: InFile<&ast::Pat>) -> Option { @@ -264,6 +264,6 @@ impl BodySourceMap { } pub fn field_syntax(&self, expr: ExprId, field: usize) -> AstPtr { - self.field_map[&(expr, field)] + self.field_map[&(expr, field)].clone() } } -- cgit v1.2.3