Skip to content

Commit c4bb70f

Browse files
Add regression test for private fields in tuple struct
1 parent 1abbd4c commit c4bb70f

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// This test checks the diplay of "/* private fields */" sentence in tuple structs.
2+
#![crate_name = "foo"]
3+
4+
// @has 'foo/struct.A.html' '//*[@class="rust item-decl"]/code' 'pub struct A(pub u8, _);'
5+
pub struct A(pub u8, u8);
6+
// @has 'foo/struct.B.html' '//*[@class="rust item-decl"]/code' 'pub struct B(_, pub u8);'
7+
pub struct B(u8, pub u8);
8+
// @has 'foo/struct.C.html' '//*[@class="rust item-decl"]/code' 'pub struct C(_, pub u8, _);'
9+
pub struct C(u8, pub u8, u8);
10+
// @has 'foo/struct.D.html' '//*[@class="rust item-decl"]/code' 'pub struct D(pub u8, _, pub u8);'
11+
pub struct D(pub u8, u8, pub u8);
12+
// @has 'foo/struct.E.html' '//*[@class="rust item-decl"]/code' 'pub struct E(/* private fields */);'
13+
pub struct E(u8);
14+
// @has 'foo/struct.F.html' '//*[@class="rust item-decl"]/code' 'pub struct F(/* private fields */);'
15+
pub struct F(u8, u8);

0 commit comments

Comments
 (0)