2018-11-24 07:34:13 -06:00
|
|
|
// force-host
|
2018-07-11 17:49:23 -05:00
|
|
|
// no-prefer-dynamic
|
|
|
|
|
|
|
|
#![crate_type = "proc-macro"]
|
|
|
|
|
|
|
|
extern crate proc_macro;
|
|
|
|
|
|
|
|
use proc_macro::TokenStream;
|
|
|
|
|
2019-05-21 19:47:23 -05:00
|
|
|
#[proc_macro = "test"] //~ ERROR malformed `proc_macro` attribute
|
2018-07-11 17:49:23 -05:00
|
|
|
pub fn a(a: TokenStream) -> TokenStream { a }
|
|
|
|
|
2019-05-21 19:47:23 -05:00
|
|
|
#[proc_macro()] //~ ERROR malformed `proc_macro` attribute
|
2018-07-11 17:49:23 -05:00
|
|
|
pub fn c(a: TokenStream) -> TokenStream { a }
|
|
|
|
|
2019-05-21 19:47:23 -05:00
|
|
|
#[proc_macro(x)] //~ ERROR malformed `proc_macro` attribute
|
2018-07-11 17:49:23 -05:00
|
|
|
pub fn d(a: TokenStream) -> TokenStream { a }
|
|
|
|
|
2019-05-21 19:47:23 -05:00
|
|
|
#[proc_macro_attribute = "test"] //~ ERROR malformed `proc_macro_attribute` attribute
|
2018-07-11 17:49:23 -05:00
|
|
|
pub fn e(_: TokenStream, a: TokenStream) -> TokenStream { a }
|
|
|
|
|
2019-05-21 19:47:23 -05:00
|
|
|
#[proc_macro_attribute()] //~ ERROR malformed `proc_macro_attribute` attribute
|
2018-07-11 17:49:23 -05:00
|
|
|
pub fn g(_: TokenStream, a: TokenStream) -> TokenStream { a }
|
|
|
|
|
2019-05-21 19:47:23 -05:00
|
|
|
#[proc_macro_attribute(x)] //~ ERROR malformed `proc_macro_attribute` attribute
|
2018-07-11 17:49:23 -05:00
|
|
|
pub fn h(_: TokenStream, a: TokenStream) -> TokenStream { a }
|