summary refs log tree commit diff
path: root/src/test/ui/proc-macro/reserved-macro-names.rs
blob: 9f56eccb7a61c1f26d7ab059cf71f01796a1c781 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// 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
}

#[proc_macro_attribute]
pub fn derive(_: TokenStream, input: TokenStream) -> TokenStream {
    //~^ ERROR name `derive` is reserved in attribute namespace
    input
}