mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-12 05:08:52 +00:00
Remove fixed FIXME, propagate errors better
This commit is contained in:
parent
e2d8e1120f
commit
9a3bb19d32
1 changed files with 2 additions and 6 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue