Simplify unresolved proc-macro handling

This commit is contained in:
Lukas Wirth 2024-06-30 13:26:13 +02:00
parent 7b11fdeb68
commit 882ae7105d
3 changed files with 44 additions and 29 deletions

View file

@ -637,10 +637,6 @@ impl<'a> AssocItemCollector<'a> {
attr,
) {
Ok(ResolvedAttr::Macro(call_id)) => {
// If proc attribute macro expansion is disabled, skip expanding it here
if !self.db.expand_proc_attr_macros() {
continue 'attrs;
}
let loc = self.db.lookup_intern_macro_call(call_id);
if let MacroDefKind::ProcMacro(_, exp, _) = loc.def.kind {
// If there's no expander for the proc macro (e.g. the