Remove MacroKind::ProcMacroStub
It's internal to resolve and always results in `Res::Err` outside of resolve. Instead put `DefKind::Fn`s themselves into the macro namespace, it's ok. Proc macro stubs are items placed into macro namespase for functions that define proc macros. https://github.com/rust-lang/rust/pull/52383 The rustdoc test is changed because the old test didn't actually reproduce the ICE it was supposed to reproduce.
This commit is contained in:
@@ -2471,7 +2471,6 @@ impl<'a> fmt::Display for Item<'a> {
|
||||
MacroKind::Bang => write!(fmt, "Macro ")?,
|
||||
MacroKind::Attr => write!(fmt, "Attribute Macro ")?,
|
||||
MacroKind::Derive => write!(fmt, "Derive Macro ")?,
|
||||
MacroKind::ProcMacroStub => unreachable!(),
|
||||
}
|
||||
clean::PrimitiveItem(..) => write!(fmt, "Primitive Type ")?,
|
||||
clean::StaticItem(..) | clean::ForeignStaticItem(..) => write!(fmt, "Static ")?,
|
||||
@@ -5092,7 +5091,6 @@ fn item_proc_macro(w: &mut fmt::Formatter<'_>, cx: &Context, it: &clean::Item, m
|
||||
}
|
||||
write!(w, "</pre>")?;
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
document(w, cx, it)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user