aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorJonas Schievink <[email protected]>2020-11-24 20:52:19 +0000
committerJonas Schievink <[email protected]>2020-11-24 20:52:19 +0000
commit9a3bb19d3274824d6648117ab32ac59358ff1f14 (patch)
tree5e82b03ac773d03f3dede590542b2d4f45b28b90 /crates
parente2d8e1120fbf99d40e8b69039b5e25e788365779 (diff)
Remove fixed FIXME, propagate errors better
Diffstat (limited to 'crates')
-rw-r--r--crates/hir_expand/src/db.rs8
1 files changed, 2 insertions, 6 deletions
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(
359 359
360 match result.error { 360 match result.error {
361 Some(error) => { 361 Some(error) => {
362 // FIXME: 362 // Safety check for recursive identity macro.
363 // In future, we should propagate the actual error with recovery information
364 // instead of ignore the error here.
365
366 // Safe check for recurisve identity macro
367 let node = parse.syntax_node(); 363 let node = parse.syntax_node();
368 let file: HirFileId = macro_file.into(); 364 let file: HirFileId = macro_file.into();
369 let call_node = match file.call_node(db) { 365 let call_node = match file.call_node(db) {
@@ -374,7 +370,7 @@ pub fn parse_macro_with_arg(
374 }; 370 };
375 371
376 if !diff(&node, &call_node.value).is_empty() { 372 if !diff(&node, &call_node.value).is_empty() {
377 MacroResult { value: Some((parse, Arc::new(rev_token_map))), error: None } 373 MacroResult { value: Some((parse, Arc::new(rev_token_map))), error: Some(error) }
378 } else { 374 } else {
379 return MacroResult::error(error); 375 return MacroResult::error(error);
380 } 376 }