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

33 lines
810 B
Text
Raw Normal View History

error: `proc-macro` crate types cannot export any items other than functions tagged with `#[proc_macro_derive]` currently
2018-12-25 08:56:47 -07:00
--> $DIR/pub-at-crate-root.rs:8:1
|
2019-03-09 15:03:44 +03:00
LL | / pub mod a {
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
2018-12-25 08:56:47 -07:00
--> $DIR/pub-at-crate-root.rs:12:5
|
LL | / pub fn bar(a: TokenStream) -> TokenStream {
2019-03-09 15:03:44 +03:00
LL | |
LL | | a
LL | | }
| |_____^
error: functions tagged with `#[proc_macro_derive]` must be `pub`
2018-12-25 08:56:47 -07:00
--> $DIR/pub-at-crate-root.rs:19:1
|
LL | / fn bar(a: proc_macro::TokenStream) -> proc_macro::TokenStream {
2019-03-09 15:03:44 +03:00
LL | |
LL | | a
LL | | }
| |_^
error: aborting due to 3 previous errors