1
Fork 0
rust/src/test/ui/proc-macro/pub-at-crate-root.stderr

33 lines
998 B
Text
Raw Normal View History

error: `proc-macro` crate types cannot export any items other than functions tagged with `#[proc_macro_derive]` currently
--> $DIR/pub-at-crate-root.rs:18:1
|
LL | / pub mod a { //~ `proc-macro` crate types cannot export any items
LL | | use proc_macro::TokenStream;
LL | |
LL | | #[proc_macro_derive(B)]
... |
LL | | }
LL | | }
| |_^
error: functions tagged with `#[proc_macro_derive]` must currently reside in the root of the crate
--> $DIR/pub-at-crate-root.rs:22:5
|
LL | / pub fn bar(a: TokenStream) -> TokenStream {
LL | | //~^ ERROR: must currently reside in the root of the crate
LL | | a
LL | | }
| |_____^
error: functions tagged with `#[proc_macro_derive]` must be `pub`
--> $DIR/pub-at-crate-root.rs:29:1
|
LL | / fn bar(a: proc_macro::TokenStream) -> proc_macro::TokenStream {
LL | | //~^ ERROR: functions tagged with `#[proc_macro_derive]` must be `pub`
LL | | a
LL | | }
| |_^
error: aborting due to 3 previous errors