summaryrefslogtreecommitdiffstats
path: root/tests/rustdoc-ui/proc_macro_bug.rs
blob: e384e4863adb9e8f02b9a37e20bc518d1c6a0428 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// regression test for failing to pass `--crate-type proc-macro` to rustdoc
// when documenting a proc macro crate https://github.com/rust-lang/rust/pull/107291

extern crate proc_macro;

use proc_macro::TokenStream;

#[proc_macro_derive(DeriveA)]
//~^ ERROR the `#[proc_macro_derive]` attribute is only usable with crates of the `proc-macro` crate type
pub fn a_derive(input: TokenStream) -> TokenStream {
    input
}