1 // aux-build:test-macros.rs
2 // gate-test-proc_macro_hygiene
4 #![feature(stmt_expr_attributes)]
7 extern crate test_macros;
10 #![empty_attr] //~ ERROR: inner macro attributes are unstable
14 #![empty_attr] //~ ERROR: inner macro attributes are unstable
17 #[empty_attr = "y"] //~ ERROR: key-value macro attributes are not supported
26 #[empty_attr] //~ ERROR: custom attributes cannot be applied to statements
30 #[empty_attr] //~ ERROR: custom attributes cannot be applied to statements
34 #[empty_attr] //~ ERROR: custom attributes cannot be applied to statements
38 let _x = #[identity_attr] 2; //~ ERROR: custom attributes cannot be applied to expressions
41 let _x = [#[identity_attr] 2]; //~ ERROR: custom attributes cannot be applied to expressions
44 let _x = #[identity_attr] println!();
45 //~^ ERROR: custom attributes cannot be applied to expressions
49 #![test] //~ ERROR inner macro attributes are unstable
50 //~| WARN this was previously accepted