]> git.lizzy.rs Git - rust.git/blob - tests/ui/proc-macro/visibility-path.rs
Rollup merge of #106726 - cmorin6:fix-comment-typos, r=Nilstrieb
[rust.git] / tests / ui / proc-macro / visibility-path.rs
1 // Proc macro defined with `pub(path)` doesn't ICEs due to resolving the `path` (issue #68921).
2
3 // force-host
4 // no-prefer-dynamic
5
6 #![crate_type = "proc-macro"]
7
8 extern crate proc_macro;
9 use proc_macro::*;
10
11 #[proc_macro]
12 pub(self) fn outer(input: TokenStream) -> TokenStream {
13     //~^ ERROR functions tagged with `#[proc_macro]` must be `pub`
14     input
15 }
16
17 mod m {
18     use proc_macro::*;
19
20     #[proc_macro]
21     pub(super) fn inner(input: TokenStream) -> TokenStream {
22         //~^ ERROR functions tagged with `#[proc_macro]` must currently reside in the root
23         input
24     }
25 }