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