@@ -134,11 +134,7 @@ pub(crate) fn try_inline(
134134 } )
135135 }
136136 Res :: Def ( DefKind :: Macro ( kind) , did) => {
137- let is_doc_hidden = cx. tcx . is_doc_hidden ( did)
138- || attrs_without_docs
139- . map ( |( attrs, _) | attrs)
140- . is_some_and ( |attrs| utils:: attrs_have_doc_flag ( attrs. iter ( ) , sym:: hidden) ) ;
141- let mac = build_macro ( cx, did, name, import_def_id, kind, is_doc_hidden) ;
137+ let mac = build_macro ( cx, did, name, kind) ;
142138
143139 let type_kind = match kind {
144140 MacroKind :: Bang => ItemType :: Macro ,
@@ -740,18 +736,14 @@ fn build_macro(
740736 cx : & mut DocContext < ' _ > ,
741737 def_id : DefId ,
742738 name : Symbol ,
743- import_def_id : Option < LocalDefId > ,
744739 macro_kind : MacroKind ,
745- is_doc_hidden : bool ,
746740) -> clean:: ItemKind {
747741 match CStore :: from_tcx ( cx. tcx ) . load_macro_untracked ( def_id, cx. tcx ) {
748742 LoadedMacro :: MacroDef { def, .. } => match macro_kind {
749- MacroKind :: Bang => {
750- let vis = cx. tcx . visibility ( import_def_id. map ( |d| d. to_def_id ( ) ) . unwrap_or ( def_id) ) ;
751- clean:: MacroItem ( clean:: Macro {
752- source : utils:: display_macro_source ( cx, name, & def, def_id, vis, is_doc_hidden) ,
753- } )
754- }
743+ MacroKind :: Bang => clean:: MacroItem ( clean:: Macro {
744+ source : utils:: display_macro_source ( cx, name, & def) ,
745+ macro_rules : def. macro_rules ,
746+ } ) ,
755747 MacroKind :: Derive | MacroKind :: Attr => {
756748 clean:: ProcMacroItem ( clean:: ProcMacro { kind : macro_kind, helpers : Vec :: new ( ) } )
757749 }
0 commit comments