]>
Commit | Line | Data |
---|---|---|
0731742a XL |
1 | error: `proc-macro` crate types cannot export any items other than functions tagged with `#[proc_macro_derive]` currently |
2 | --> $DIR/pub-at-crate-root.rs:8:1 | |
3 | | | |
4 | LL | / pub mod a { //~ `proc-macro` crate types cannot export any items | |
5 | LL | | use proc_macro::TokenStream; | |
6 | LL | | | |
7 | LL | | #[proc_macro_derive(B)] | |
8 | ... | | |
9 | LL | | } | |
10 | LL | | } | |
11 | | |_^ | |
12 | ||
13 | error: functions tagged with `#[proc_macro_derive]` must currently reside in the root of the crate | |
14 | --> $DIR/pub-at-crate-root.rs:12:5 | |
15 | | | |
16 | LL | / pub fn bar(a: TokenStream) -> TokenStream { | |
17 | LL | | //~^ ERROR: must currently reside in the root of the crate | |
18 | LL | | a | |
19 | LL | | } | |
20 | | |_____^ | |
21 | ||
22 | error: functions tagged with `#[proc_macro_derive]` must be `pub` | |
23 | --> $DIR/pub-at-crate-root.rs:19:1 | |
24 | | | |
25 | LL | / fn bar(a: proc_macro::TokenStream) -> proc_macro::TokenStream { | |
26 | LL | | //~^ ERROR: functions tagged with `#[proc_macro_derive]` must be `pub` | |
27 | LL | | a | |
28 | LL | | } | |
29 | | |_^ | |
30 | ||
31 | error: aborting due to 3 previous errors | |
32 |