13 lines
530 B
Rust
13 lines
530 B
Rust
use rustc_ast::MetaItem;
|
|
use rustc_expand::base::ExtCtxt;
|
|
use rustc_feature::AttributeTemplate;
|
|
use rustc_parse::validate_attr;
|
|
use rustc_span::Symbol;
|
|
|
|
pub fn check_builtin_macro_attribute(ecx: &ExtCtxt<'_>, meta_item: &MetaItem, name: Symbol) {
|
|
// All the built-in macro attributes are "words" at the moment.
|
|
let template = AttributeTemplate { word: true, ..Default::default() };
|
|
let attr = ecx.attribute(meta_item.clone());
|
|
validate_attr::check_builtin_attribute(&ecx.sess.parse_sess, &attr, name, template);
|
|
}
|