1 // Copyright 2018 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
13 #![crate_type = "proc-macro"]
14 #![feature(proc_macro)]
16 extern crate proc_macro;
18 use proc_macro::TokenStream;
20 #[proc_macro = "test"] //~ ERROR: does not take any arguments
21 pub fn a(a: TokenStream) -> TokenStream { a }
23 #[proc_macro()] //~ ERROR: does not take any arguments
24 pub fn c(a: TokenStream) -> TokenStream { a }
26 #[proc_macro(x)] //~ ERROR: does not take any arguments
27 pub fn d(a: TokenStream) -> TokenStream { a }
29 #[proc_macro_attribute = "test"] //~ ERROR: does not take any arguments
30 pub fn e(_: TokenStream, a: TokenStream) -> TokenStream { a }
32 #[proc_macro_attribute()] //~ ERROR: does not take any arguments
33 pub fn g(_: TokenStream, a: TokenStream) -> TokenStream { a }
35 #[proc_macro_attribute(x)] //~ ERROR: does not take any arguments
36 pub fn h(_: TokenStream, a: TokenStream) -> TokenStream { a }