rust/src/libsyntax/ext/proc_macro.rs
Vadim Petrochenkov 3eeec1c5d2 Break dependencies between syntax_ext and some other crates
Move `source_uitil` macros into `syntax_ext`
Cleanup dependencies of `rustc_driver`
2019-07-27 13:52:37 +03:00

8 lines
232 B
Rust

use crate::ast::Attribute;
use crate::symbol::sym;
pub fn is_proc_macro_attr(attr: &Attribute) -> bool {
[sym::proc_macro, sym::proc_macro_attribute, sym::proc_macro_derive]
.iter().any(|kind| attr.check_name(*kind))
}