fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #67350 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum73528e339aa

1.40.0
810 B32 linesraw
1error: `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   |
4LL | / pub mod a {
5LL | |     use proc_macro::TokenStream;
6LL | |
7LL | |     #[proc_macro_derive(B)]
8...  |
9LL | |     }
10LL | | }
11   | |_^
12
13error: 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   |
16LL | /     pub fn bar(a: TokenStream) -> TokenStream {
17LL | |
18LL | |         a
19LL | |     }
20   | |_____^
21
22error: functions tagged with `#[proc_macro_derive]` must be `pub`
23  --> $DIR/pub-at-crate-root.rs:19:1
24   |
25LL | / fn bar(a: proc_macro::TokenStream) -> proc_macro::TokenStream {
26LL | |
27LL | |     a
28LL | | }
29   | |_^
30
31error: aborting due to 3 previous errors
32