blob: 4efd9e952fc14855a3121cca84c8b0ca4466b7f7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
extern crate proc_macro;
#[proc_macro_derive(Foo)]
//~^ ERROR: only usable with crates of the `proc-macro` crate type
pub fn foo(a: proc_macro::TokenStream) -> proc_macro::TokenStream {
a
}
// Issue #37590
#[proc_macro_derive(Foo)]
//~^ ERROR: the `#[proc_macro_derive]` attribute may only be used on bare functions
pub struct Foo {
}
fn main() {}
|