Strip delimiter from fn-like proc macro input

This commit is contained in:
Jonas Schievink 2021-05-12 00:27:16 +02:00
parent a328a6bc75
commit bda68e2332
2 changed files with 33 additions and 2 deletions

View file

@ -272,6 +272,10 @@ impl MacroDefId {
};
Either::Left(*id)
}
pub fn is_proc_macro(&self) -> bool {
matches!(self.kind, MacroDefKind::ProcMacro(..))
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]