Skip to content

Commit 6c6d7c3

Browse files
committed
test: Add tests for multiple outer attributes on items
Issue #487
1 parent 1c9277e commit 6c6d7c3

File tree

1 file changed

+41
-11
lines changed

1 file changed

+41
-11
lines changed

src/test/run-pass/item-attributes.rs

Lines changed: 41 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,51 @@
11
// xfail-stage0
22

3-
#[attr = "val"]
4-
const int x = 10;
3+
mod test_single_attr_outer {
54

6-
#[attr = "val"]
7-
mod mod1 {
8-
}
5+
#[attr = "val"]
6+
const int x = 10;
7+
8+
#[attr = "val"]
9+
mod mod1 {
10+
}
11+
12+
#[attr = "val"]
13+
native "rust" mod rustrt {
14+
}
15+
16+
#[attr = "val"]
17+
type t = obj { };
18+
19+
#[attr = "val"]
20+
obj o() { }
921

10-
#[attr = "val"]
11-
native "rust" mod rustrt {
1222
}
1323

14-
#[attr = "val"]
15-
type t = obj { };
24+
mod test_multi_attr_outer {
25+
26+
#[attr1 = "val"]
27+
#[attr2 = "val"]
28+
const int x = 10;
1629

17-
#[attr = "val"]
18-
obj o() { }
30+
#[attr1 = "val"]
31+
#[attr2 = "val"]
32+
mod mod1 {
33+
}
34+
35+
#[attr1 = "val"]
36+
#[attr2 = "val"]
37+
native "rust" mod rustrt {
38+
}
39+
40+
#[attr1 = "val"]
41+
#[attr2 = "val"]
42+
type t = obj { };
43+
44+
#[attr1 = "val"]
45+
#[attr2 = "val"]
46+
obj o() { }
47+
48+
}
1949

2050
fn main() {
2151
}

0 commit comments

Comments
 (0)