]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/stmt_expr_attrs_placement.rs
Rollup merge of #69625 - Stebalien:feat/iter-copy-specialize, r=KodrAus
[rust.git] / src / test / ui / parser / stmt_expr_attrs_placement.rs
1 #![feature(stmt_expr_attributes)]
2
3 // Test that various placements of the inner attribute are parsed correctly,
4 // or not.
5
6 fn main() {
7     let a = #![allow(warnings)] (1, 2);
8     //~^ ERROR an inner attribute is not permitted in this context
9
10     let b = (#![allow(warnings)] 1, 2);
11
12     let c = {
13         #![allow(warnings)]
14         (#![allow(warnings)] 1, 2)
15     };
16
17     let d = {
18         #![allow(warnings)]
19         let e = (#![allow(warnings)] 1, 2);
20         e
21     };
22 }