]> git.proxmox.com Git - rustc.git/blob - src/libsyntax/expand/mod.rs
New upstream version 1.41.1+dfsg1
[rustc.git] / src / libsyntax / expand / mod.rs
1 //! Definitions shared by macros / syntax extensions and e.g. librustc.
2
3 use crate::ast::Attribute;
4 use syntax_pos::symbol::sym;
5
6 pub mod allocator;
7
8 pub fn is_proc_macro_attr(attr: &Attribute) -> bool {
9 [sym::proc_macro, sym::proc_macro_attribute, sym::proc_macro_derive]
10 .iter().any(|kind| attr.check_name(*kind))
11 }