]> git.lizzy.rs Git - rust.git/blob - tests/ui/proc-macro/reserved-macro-names.rs
Rollup merge of #106726 - cmorin6:fix-comment-typos, r=Nilstrieb
[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 }