mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 01:34:21 +00:00
remove the special case for nonexported macro_rules! macros
This commit is contained in:
parent
905fd73154
commit
6d8b56972c
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user