Skip to content

Commit 6d8b569

Browse files
committed
remove the special case for nonexported macro_rules! macros
1 parent 905fd73 commit 6d8b569

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

src/librustdoc/doctest.rs

-10
Original file line numberDiff line numberDiff line change
@@ -1225,16 +1225,6 @@ impl<'a, 'hir, 'tcx> intravisit::Visitor<'hir> for HirCollector<'a, 'hir, 'tcx>
12251225

12261226
fn visit_item(&mut self, item: &'hir hir::Item<'_>) {
12271227
let name = match &item.kind {
1228-
hir::ItemKind::Macro(ref macro_def, _) => {
1229-
// FIXME(#88038): Non exported macros have historically not been tested,
1230-
// but we really ought to start testing them.
1231-
let def_id = item.def_id.to_def_id();
1232-
if macro_def.macro_rules && !self.tcx.has_attr(def_id, sym::macro_export) {
1233-
intravisit::walk_item(self, item);
1234-
return;
1235-
}
1236-
item.ident.to_string()
1237-
}
12381228
hir::ItemKind::Impl(impl_) => {
12391229
rustc_hir_pretty::id_to_string(&self.map, impl_.self_ty.hir_id)
12401230
}

0 commit comments

Comments
 (0)