@@ -134,11 +134,7 @@ pub(crate) fn try_inline(
134
134
} )
135
135
}
136
136
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) ;
142
138
143
139
let type_kind = match kind {
144
140
MacroKind :: Bang => ItemType :: Macro ,
@@ -740,18 +736,14 @@ fn build_macro(
740
736
cx : & mut DocContext < ' _ > ,
741
737
def_id : DefId ,
742
738
name : Symbol ,
743
- import_def_id : Option < LocalDefId > ,
744
739
macro_kind : MacroKind ,
745
- is_doc_hidden : bool ,
746
740
) -> clean:: ItemKind {
747
741
match CStore :: from_tcx ( cx. tcx ) . load_macro_untracked ( def_id, cx. tcx ) {
748
742
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
+ } ) ,
755
747
MacroKind :: Derive | MacroKind :: Attr => {
756
748
clean:: ProcMacroItem ( clean:: ProcMacro { kind : macro_kind, helpers : Vec :: new ( ) } )
757
749
}
0 commit comments