diff options
Diffstat (limited to 'crates/ra_hir/src/expr')
-rw-r--r-- | crates/ra_hir/src/expr/validation.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/ra_hir/src/expr/validation.rs b/crates/ra_hir/src/expr/validation.rs index 4e6131dce..c2a10a0b5 100644 --- a/crates/ra_hir/src/expr/validation.rs +++ b/crates/ra_hir/src/expr/validation.rs | |||
@@ -71,7 +71,8 @@ impl<'a, 'b> ExprValidator<'a, 'b> { | |||
71 | } | 71 | } |
72 | let source_map = self.func.body_source_map(db); | 72 | let source_map = self.func.body_source_map(db); |
73 | let file_id = self.func.source(db).file_id; | 73 | let file_id = self.func.source(db).file_id; |
74 | let source_file = db.parse(file_id.original_file(db)).tree; | 74 | let parse = db.parse(file_id.original_file(db)); |
75 | let source_file = parse.tree(); | ||
75 | if let Some(field_list_node) = source_map | 76 | if let Some(field_list_node) = source_map |
76 | .expr_syntax(id) | 77 | .expr_syntax(id) |
77 | .map(|ptr| ptr.to_node(source_file.syntax())) | 78 | .map(|ptr| ptr.to_node(source_file.syntax())) |