about summary refs log tree commit diff
path: root/tests/ui/proc-macro/reserved-macro-names.rs
blob: 0cbb0c06096d112015b10573a35829bbe7e390f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//@ 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
}