about summary refs log tree commit diff
diff options
context:
space:
mode:
authorYoshiki Matsuda <myskjp@gmail.com>2022-05-02 18:50:54 +0900
committerYoshiki Matsuda <myskjp@gmail.com>2022-05-02 18:50:54 +0900
commit6d8b56972ce239f107f03001fef8982849be34a9 (patch)
tree3e51e7dcbf2ae2afc65a686a8b7fe5fd9c5f88b8
parent905fd731543ee837bd9f4cf960b048610d037155 (diff)
downloadrust-6d8b56972ce239f107f03001fef8982849be34a9.tar.gz
rust-6d8b56972ce239f107f03001fef8982849be34a9.zip
remove the special case for nonexported macro_rules! macros
-rw-r--r--src/librustdoc/doctest.rs10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/librustdoc/doctest.rs b/src/librustdoc/doctest.rs
index 82e367427ef..93ccf60a1de 100644
--- a/src/librustdoc/doctest.rs
+++ b/src/librustdoc/doctest.rs
@@ -1225,16 +1225,6 @@ impl<'a, 'hir, 'tcx> intravisit::Visitor<'hir> for HirCollector<'a, 'hir, 'tcx>
 
     fn visit_item(&mut self, item: &'hir hir::Item<'_>) {
         let name = match &item.kind {
-            hir::ItemKind::Macro(ref macro_def, _) => {
-                // FIXME(#88038): Non exported macros have historically not been tested,
-                // but we really ought to start testing them.
-                let def_id = item.def_id.to_def_id();
-                if macro_def.macro_rules && !self.tcx.has_attr(def_id, sym::macro_export) {
-                    intravisit::walk_item(self, item);
-                    return;
-                }
-                item.ident.to_string()
-            }
             hir::ItemKind::Impl(impl_) => {
                 rustc_hir_pretty::id_to_string(&self.map, impl_.self_ty.hir_id)
             }