diff options
Diffstat (limited to 'crates/hir/src/lib.rs')
-rw-r--r-- | crates/hir/src/lib.rs | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs index d32246709..0a9414013 100644 --- a/crates/hir/src/lib.rs +++ b/crates/hir/src/lib.rs | |||
@@ -580,11 +580,13 @@ impl Module { | |||
580 | 580 | ||
581 | DefDiagnosticKind::UnresolvedMacroCall { ast, path } => { | 581 | DefDiagnosticKind::UnresolvedMacroCall { ast, path } => { |
582 | let node = ast.to_node(db.upcast()); | 582 | let node = ast.to_node(db.upcast()); |
583 | sink.push(UnresolvedMacroCall { | 583 | acc.push( |
584 | file: ast.file_id, | 584 | UnresolvedMacroCall { |
585 | node: AstPtr::new(&node), | 585 | macro_call: InFile::new(ast.file_id, AstPtr::new(&node)), |
586 | path: path.clone(), | 586 | path: path.clone(), |
587 | }); | 587 | } |
588 | .into(), | ||
589 | ); | ||
588 | } | 590 | } |
589 | 591 | ||
590 | DefDiagnosticKind::MacroError { ast, message } => { | 592 | DefDiagnosticKind::MacroError { ast, message } => { |
@@ -1060,13 +1062,9 @@ impl Function { | |||
1060 | precise_location: None, | 1062 | precise_location: None, |
1061 | macro_name: None, | 1063 | macro_name: None, |
1062 | }), | 1064 | }), |
1063 | BodyDiagnostic::UnresolvedMacroCall { node, path } => { | 1065 | BodyDiagnostic::UnresolvedMacroCall { node, path } => acc.push( |
1064 | sink.push(UnresolvedMacroCall { | 1066 | UnresolvedMacroCall { macro_call: node.clone(), path: path.clone() }.into(), |
1065 | file: node.file_id, | 1067 | ), |
1066 | node: node.value.clone(), | ||
1067 | path: path.clone(), | ||
1068 | }) | ||
1069 | } | ||
1070 | } | 1068 | } |
1071 | } | 1069 | } |
1072 | 1070 | ||