Make MacroDefId's AstId mandatory when possible

This commit is contained in:
Jonas Schievink 2021-03-18 15:37:14 +01:00
parent 816bc73895
commit b84efbaacf
13 changed files with 58 additions and 55 deletions

View file

@ -1154,7 +1154,8 @@ impl MacroDef {
/// Indicate it is a derive macro
pub fn is_derive_macro(&self) -> bool {
matches!(self.id.kind, MacroDefKind::ProcMacro(_) | MacroDefKind::BuiltInDerive(_))
// FIXME: wrong for `ProcMacro`
matches!(self.id.kind, MacroDefKind::ProcMacro(..) | MacroDefKind::BuiltInDerive(..))
}
}