From 9a3bb19d3274824d6648117ab32ac59358ff1f14 Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Tue, 24 Nov 2020 21:52:19 +0100 Subject: Remove fixed FIXME, propagate errors better --- crates/hir_expand/src/db.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'crates/hir_expand/src/db.rs') diff --git a/crates/hir_expand/src/db.rs b/crates/hir_expand/src/db.rs index fc512517c..3fd9a90a8 100644 --- a/crates/hir_expand/src/db.rs +++ b/crates/hir_expand/src/db.rs @@ -359,11 +359,7 @@ pub fn parse_macro_with_arg( match result.error { Some(error) => { - // FIXME: - // In future, we should propagate the actual error with recovery information - // instead of ignore the error here. - - // Safe check for recurisve identity macro + // Safety check for recursive identity macro. let node = parse.syntax_node(); let file: HirFileId = macro_file.into(); let call_node = match file.call_node(db) { @@ -374,7 +370,7 @@ pub fn parse_macro_with_arg( }; if !diff(&node, &call_node.value).is_empty() { - MacroResult { value: Some((parse, Arc::new(rev_token_map))), error: None } + MacroResult { value: Some((parse, Arc::new(rev_token_map))), error: Some(error) } } else { return MacroResult::error(error); } -- cgit v1.2.3