]> git.lizzy.rs Git - rust.git/blob - tests/ui/proc-macro/reserved-macro-names.rs
Merge commit '598f0909568a51de8a2d1148f55a644fd8dffad0' into sync_cg_clif-2023-01-24
[rust.git] / tests / ui / proc-macro / reserved-macro-names.rs
1 // force-host
2 // no-prefer-dynamic
3
4 #![crate_type = "proc-macro"]
5
6 extern crate proc_macro;
7 use proc_macro::*;
8
9 #[proc_macro_attribute]
10 pub fn cfg(_: TokenStream, input: TokenStream) -> TokenStream {
11     //~^ ERROR name `cfg` is reserved in attribute namespace
12     input
13 }
14
15 #[proc_macro_attribute]
16 pub fn cfg_attr(_: TokenStream, input: TokenStream) -> TokenStream {
17     //~^ ERROR name `cfg_attr` is reserved in attribute namespace
18     input
19 }