Make replace_derive_with_manual_impl work again

This commit is contained in:
Lukas Wirth 2022-02-21 12:57:57 +01:00
parent be3168dabe
commit f13c98034b
9 changed files with 118 additions and 130 deletions

View file

@ -1792,6 +1792,13 @@ impl MacroDef {
}
}
pub fn is_builtin_derive(&self) -> bool {
match self.id.kind {
MacroDefKind::BuiltInAttr(exp, _) => exp.is_derive(),
_ => false,
}
}
pub fn is_attr(&self) -> bool {
matches!(self.kind(), MacroKind::Attr)
}