File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -602,7 +602,17 @@ fn filename_and_frag_for_def(
602602 }
603603 Definition :: Const ( c) => format ! ( "const.{}.html" , c. name( db) ?. display( db. upcast( ) ) ) ,
604604 Definition :: Static ( s) => format ! ( "static.{}.html" , s. name( db) . display( db. upcast( ) ) ) ,
605- Definition :: Macro ( mac) => format ! ( "macro.{}.html" , mac. name( db) . display( db. upcast( ) ) ) ,
605+ Definition :: Macro ( mac) => match mac. kind ( db) {
606+ hir:: MacroKind :: Declarative
607+ | hir:: MacroKind :: BuiltIn
608+ | hir:: MacroKind :: Attr
609+ | hir:: MacroKind :: ProcMacro => {
610+ format ! ( "macro.{}.html" , mac. name( db) . display( db. upcast( ) ) )
611+ }
612+ hir:: MacroKind :: Derive => {
613+ format ! ( "derive.{}.html" , mac. name( db) . display( db. upcast( ) ) )
614+ }
615+ } ,
606616 Definition :: Field ( field) => {
607617 let def = match field. parent_def ( db) {
608618 hir:: VariantDef :: Struct ( it) => Definition :: Adt ( it. into ( ) ) ,
You can’t perform that action at this time.
0 commit comments