@@ -628,13 +628,14 @@ fn emit_def_diagnostic(db: &dyn HirDatabase, acc: &mut Vec<AnyDiagnostic>, diag:
628628 }
629629
630630 DefDiagnosticKind :: UnresolvedProcMacro { ast } => {
631- let ( node, precise_location, macro_name) = match ast {
631+ let ( node, precise_location, macro_name, kind ) = match ast {
632632 MacroCallKind :: FnLike { ast_id, .. } => {
633633 let node = ast_id. to_node ( db. upcast ( ) ) ;
634634 (
635635 ast_id. with_value ( SyntaxNodePtr :: from ( AstPtr :: new ( & node) ) ) ,
636636 node. path ( ) . map ( |it| it. syntax ( ) . text_range ( ) ) ,
637637 node. path ( ) . and_then ( |it| it. segment ( ) ) . map ( |it| it. to_string ( ) ) ,
638+ MacroKind :: ProcMacro ,
638639 )
639640 }
640641 MacroCallKind :: Derive { ast_id, derive_attr_index, derive_index } => {
@@ -665,6 +666,7 @@ fn emit_def_diagnostic(db: &dyn HirDatabase, acc: &mut Vec<AnyDiagnostic>, diag:
665666 ast_id. with_value ( SyntaxNodePtr :: from ( AstPtr :: new ( & node) ) ) ,
666667 token. as_ref ( ) . map ( |tok| tok. text_range ( ) ) ,
667668 token. as_ref ( ) . map ( ToString :: to_string) ,
669+ MacroKind :: Derive ,
668670 )
669671 }
670672 MacroCallKind :: Attr { ast_id, invoc_attr_index, .. } => {
@@ -683,10 +685,11 @@ fn emit_def_diagnostic(db: &dyn HirDatabase, acc: &mut Vec<AnyDiagnostic>, diag:
683685 . and_then ( |seg| seg. name_ref ( ) )
684686 . as_ref ( )
685687 . map ( ToString :: to_string) ,
688+ MacroKind :: Attr ,
686689 )
687690 }
688691 } ;
689- acc. push ( UnresolvedProcMacro { node, precise_location, macro_name } . into ( ) ) ;
692+ acc. push ( UnresolvedProcMacro { node, precise_location, macro_name, kind } . into ( ) ) ;
690693 }
691694
692695 DefDiagnosticKind :: UnresolvedMacroCall { ast, path } => {
@@ -1159,6 +1162,7 @@ impl DefWithBody {
11591162 node : node. clone ( ) . map ( |it| it. into ( ) ) ,
11601163 precise_location : None ,
11611164 macro_name : None ,
1165+ kind : MacroKind :: ProcMacro ,
11621166 }
11631167 . into ( ) ,
11641168 ) ,
0 commit comments