]> git.lizzy.rs Git - rust.git/blob - tests/ui/proc-macro/non-root.rs
Rollup merge of #106726 - cmorin6:fix-comment-typos, r=Nilstrieb
[rust.git] / tests / ui / proc-macro / non-root.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 fn foo(arg: TokenStream) -> TokenStream {
10     #[proc_macro]
11     pub fn foo(arg: TokenStream) -> TokenStream { arg }
12     //~^ ERROR functions tagged with `#[proc_macro]` must currently reside in the root of the crate
13
14     arg
15 }