@@ -219,6 +219,8 @@ impl<'a, 'tcx, 'rcx> RustdocVisitor<'a, 'tcx, 'rcx> {
219
219
if let Some ( exports) = self . cx . tcx . module_exports ( def_id) {
220
220
for export in exports. iter ( ) . filter ( |e| e. vis == Visibility :: Public ) {
221
221
if let Def :: Macro ( def_id, ..) = export. def {
222
+ // FIXME(50647): this eager macro inlining does not take
223
+ // doc(hidden)/doc(no_inline) into account
222
224
if def_id. krate == LOCAL_CRATE {
223
225
continue // These are `krate.exported_macros`, handled in `self.visit()`.
224
226
}
@@ -237,6 +239,7 @@ impl<'a, 'tcx, 'rcx> RustdocVisitor<'a, 'tcx, 'rcx> {
237
239
unreachable ! ( )
238
240
} ;
239
241
242
+ debug ! ( "inlining macro {}" , def. ident. name) ;
240
243
om. macros . push ( Macro {
241
244
def_id,
242
245
attrs : def. attrs . clone ( ) . into ( ) ,
@@ -561,6 +564,7 @@ impl<'a, 'tcx, 'rcx> RustdocVisitor<'a, 'tcx, 'rcx> {
561
564
562
565
// convert each exported_macro into a doc item
563
566
fn visit_local_macro ( & self , def : & hir:: MacroDef ) -> Macro {
567
+ debug ! ( "visit_local_macro: {}" , def. name) ;
564
568
let tts = def. body . trees ( ) . collect :: < Vec < _ > > ( ) ;
565
569
// Extract the spans of all matchers. They represent the "interface" of the macro.
566
570
let matchers = tts. chunks ( 4 ) . map ( |arm| arm[ 0 ] . span ( ) ) . collect ( ) ;
0 commit comments