]> git.proxmox.com Git - rustc.git/blob - src/librustc_ast/expand/mod.rs
New upstream version 1.43.0+dfsg1
[rustc.git] / src / librustc_ast / expand / mod.rs
1 //! Definitions shared by macros / syntax extensions and e.g. librustc.
2
3 use crate::ast::Attribute;
4 use rustc_span::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()
11 .any(|kind| attr.check_name(*kind))
12 }