1 #![feature(stmt_expr_attributes)]
3 // Test that various placements of the inner attribute are parsed correctly,
7 let a = #![allow(warnings)] (1, 2);
8 //~^ ERROR an inner attribute is not permitted in this context
10 let b = (#![allow(warnings)] 1, 2);
11 //~^ ERROR an inner attribute is not permitted in this context
15 (#![allow(warnings)] 1, 2)
16 //~^ ERROR an inner attribute is not permitted in this context
21 let e = (#![allow(warnings)] 1, 2);
22 //~^ ERROR an inner attribute is not permitted in this context
26 let e = [#![allow(warnings)] 1, 2];
27 //~^ ERROR an inner attribute is not permitted in this context
29 let f = [#![allow(warnings)] 1; 0];
30 //~^ ERROR an inner attribute is not permitted in this context
32 let g = match true { #![allow(warnings)] _ => {} };
35 struct MyStruct { field: u8 }
36 let h = MyStruct { #![allow(warnings)] field: 0 };
37 //~^ ERROR an inner attribute is not permitted in this context