diff options
Diffstat (limited to 'crates/hir_def/src/nameres.rs')
-rw-r--r-- | crates/hir_def/src/nameres.rs | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/crates/hir_def/src/nameres.rs b/crates/hir_def/src/nameres.rs index 9e181751c..542f190a1 100644 --- a/crates/hir_def/src/nameres.rs +++ b/crates/hir_def/src/nameres.rs | |||
@@ -481,7 +481,7 @@ mod diagnostics { | |||
481 | 481 | ||
482 | UnresolvedProcMacro { ast: MacroCallKind }, | 482 | UnresolvedProcMacro { ast: MacroCallKind }, |
483 | 483 | ||
484 | UnresolvedMacroCall { ast: AstId<ast::MacroCall> }, | 484 | UnresolvedMacroCall { ast: AstId<ast::MacroCall>, path: ModPath }, |
485 | 485 | ||
486 | MacroError { ast: MacroCallKind, message: String }, | 486 | MacroError { ast: MacroCallKind, message: String }, |
487 | } | 487 | } |
@@ -546,8 +546,9 @@ mod diagnostics { | |||
546 | pub(super) fn unresolved_macro_call( | 546 | pub(super) fn unresolved_macro_call( |
547 | container: LocalModuleId, | 547 | container: LocalModuleId, |
548 | ast: AstId<ast::MacroCall>, | 548 | ast: AstId<ast::MacroCall>, |
549 | path: ModPath, | ||
549 | ) -> Self { | 550 | ) -> Self { |
550 | Self { in_module: container, kind: DiagnosticKind::UnresolvedMacroCall { ast } } | 551 | Self { in_module: container, kind: DiagnosticKind::UnresolvedMacroCall { ast, path } } |
551 | } | 552 | } |
552 | 553 | ||
553 | pub(super) fn add_to( | 554 | pub(super) fn add_to( |
@@ -662,9 +663,13 @@ mod diagnostics { | |||
662 | }); | 663 | }); |
663 | } | 664 | } |
664 | 665 | ||
665 | DiagnosticKind::UnresolvedMacroCall { ast } => { | 666 | DiagnosticKind::UnresolvedMacroCall { ast, path } => { |
666 | let node = ast.to_node(db.upcast()); | 667 | let node = ast.to_node(db.upcast()); |
667 | sink.push(UnresolvedMacroCall { file: ast.file_id, node: AstPtr::new(&node) }); | 668 | sink.push(UnresolvedMacroCall { |
669 | file: ast.file_id, | ||
670 | node: AstPtr::new(&node), | ||
671 | path: path.clone(), | ||
672 | }); | ||
668 | } | 673 | } |
669 | 674 | ||
670 | DiagnosticKind::MacroError { ast, message } => { | 675 | DiagnosticKind::MacroError { ast, message } => { |