From 74f3cca85ab870614f314c6180e2fbb883ad4fe3 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 13 Jun 2021 20:13:15 +0300 Subject: internal: refactor remove this semicolon diagnostics --- crates/hir/src/lib.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'crates/hir/src/lib.rs') diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs index c1af5f097..cb9bf60b8 100644 --- a/crates/hir/src/lib.rs +++ b/crates/hir/src/lib.rs @@ -1184,10 +1184,7 @@ impl Function { } BodyValidationDiagnostic::RemoveThisSemicolon { expr } => { match source_map.expr_syntax(expr) { - Ok(source_ptr) => sink.push(RemoveThisSemicolon { - file: source_ptr.file_id, - expr: source_ptr.value, - }), + Ok(expr) => acc.push(RemoveThisSemicolon { expr }.into()), Err(SyntheticSyntax) => (), } } -- cgit v1.2.3