1 #![feature(custom_attribute)]
3 macro_rules! stmt_mac {
13 #[attr] //~ ERROR attributes on expressions are experimental
25 // Check that cfg works right
39 #[cfg_attr(not(unset), cfg(unset))]
45 #[cfg_attr(not(unset), cfg(not(unset)))]
51 // check that macro expansion and cfg works right
53 macro_rules! item_mac {
71 #[cfg_attr(not(unset), cfg(unset))]
77 #[cfg_attr(not(unset), cfg(not(unset)))]
89 // check that the gate visitor works right:
93 fn x(a: [u8; #[attr] 5]);
94 fn y(a: [u8; #[attr] 5]); //~ ERROR attributes on expressions are experimental
100 const X: u8 = #[attr] 5;
101 const Y: u8 = #[attr] 5; //~ ERROR attributes on expressions are experimental
106 const X: [u8; #[attr] 5];
107 const Y: [u8; #[attr] 5]; //~ ERROR attributes on expressions are experimental
112 field: [u8; #[attr] 5],
113 field2: [u8; #[attr] 5] //~ ERROR attributes on expressions are experimental
117 #[cfg(unset)] [u8; #[attr] 5],
118 [u8; #[attr] 5] //~ ERROR attributes on expressions are experimental
123 #[cfg(unset)] [u8; #[attr] 5],
124 [u8; #[attr] 5] //~ ERROR attributes on expressions are experimental
128 field: [u8; #[attr] 5],
129 field2: [u8; #[attr] 5] //~ ERROR attributes on expressions are experimental
137 6 => #[attr] (), //~ ERROR attributes on expressions are experimental