@@ -219,6 +219,8 @@ impl<'a, 'tcx, 'rcx> RustdocVisitor<'a, 'tcx, 'rcx> {
219219 if let Some ( exports) = self . cx . tcx . module_exports ( def_id) {
220220 for export in exports. iter ( ) . filter ( |e| e. vis == Visibility :: Public ) {
221221 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
222224 if def_id. krate == LOCAL_CRATE {
223225 continue // These are `krate.exported_macros`, handled in `self.visit()`.
224226 }
@@ -237,6 +239,7 @@ impl<'a, 'tcx, 'rcx> RustdocVisitor<'a, 'tcx, 'rcx> {
237239 unreachable ! ( )
238240 } ;
239241
242+ debug ! ( "inlining macro {}" , def. ident. name) ;
240243 om. macros . push ( Macro {
241244 def_id,
242245 attrs : def. attrs . clone ( ) . into ( ) ,
@@ -561,6 +564,7 @@ impl<'a, 'tcx, 'rcx> RustdocVisitor<'a, 'tcx, 'rcx> {
561564
562565 // convert each exported_macro into a doc item
563566 fn visit_local_macro ( & self , def : & hir:: MacroDef ) -> Macro {
567+ debug ! ( "visit_local_macro: {}" , def. name) ;
564568 let tts = def. body . trees ( ) . collect :: < Vec < _ > > ( ) ;
565569 // Extract the spans of all matchers. They represent the "interface" of the macro.
566570 let matchers = tts. chunks ( 4 ) . map ( |arm| arm[ 0 ] . span ( ) ) . collect ( ) ;
0 commit comments