rust/tests/ui/proc-macro/reserved-macro-names.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
447 B
Rust
Raw Normal View History

//@ force-host
//@ no-prefer-dynamic
#![crate_type = "proc-macro"]
extern crate proc_macro;
use proc_macro::*;
#[proc_macro_attribute]
pub fn cfg(_: TokenStream, input: TokenStream) -> TokenStream {
//~^ ERROR name `cfg` is reserved in attribute namespace
input
}
#[proc_macro_attribute]
pub fn cfg_attr(_: TokenStream, input: TokenStream) -> TokenStream {
//~^ ERROR name `cfg_attr` is reserved in attribute namespace
input
}