File tree 2 files changed +20
-0
lines changed
2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change
1
+ // regression test for failing to pass `--crate-type proc-macro` to rustdoc
2
+ // when documenting a proc macro crate https://github.com/rust-lang/rust/pull/107291
3
+
4
+ extern crate proc_macro;
5
+
6
+ use proc_macro:: TokenStream ;
7
+
8
+ #[ proc_macro_derive( DeriveA ) ]
9
+ //~^ ERROR the `#[proc_macro_derive]` attribute is only usable with crates of the `proc-macro` crate type
10
+ pub fn a_derive ( input : TokenStream ) -> TokenStream {
11
+ input
12
+ }
Original file line number Diff line number Diff line change
1
+ error: the `#[proc_macro_derive]` attribute is only usable with crates of the `proc-macro` crate type
2
+ --> $DIR/proc_macro_bug.rs:8:1
3
+ |
4
+ LL | #[proc_macro_derive(DeriveA)]
5
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6
+
7
+ error: aborting due to previous error
8
+
You can’t perform that action at this time.
0 commit comments