rust/tests/ui/proc-macro/pub-at-crate-root.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
776 B
Plaintext
Raw Normal View History

error: `proc-macro` crate types currently cannot export any items other than functions tagged with `#[proc_macro]`, `#[proc_macro_derive]`, or `#[proc_macro_attribute]`
2018-12-25 15:56:47 +00:00
--> $DIR/pub-at-crate-root.rs:8:1
|
LL | pub mod a {
| ^^^^^^^^^
error: functions tagged with `#[proc_macro_derive]` must currently reside in the root of the crate
2018-12-25 15:56:47 +00:00
--> $DIR/pub-at-crate-root.rs:12:5
|
LL | pub fn bar(a: TokenStream) -> TokenStream {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: functions tagged with `#[proc_macro_derive]` must be `pub`
2018-12-25 15:56:47 +00:00
--> $DIR/pub-at-crate-root.rs:19:1
|
LL | fn bar(a: proc_macro::TokenStream) -> proc_macro::TokenStream {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 3 previous errors