Skip to content

Commit 691bc3b

Browse files
committed
Add a test for structs with visibility
1 parent f15dd87 commit 691bc3b

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

tests/source/structs.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,3 +258,8 @@ struct Loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
258258
struct Looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong {}
259259
struct Loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong {}
260260
struct Loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong { x: i32 }
261+
262+
// structs with visibility, do not duplicate visibility (#2110).
263+
pub(in self) struct Foo();
264+
pub(super) struct Foo();
265+
pub(crate) struct Foo();

tests/target/structs.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,3 +300,8 @@ struct Loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
300300
{
301301
x: i32,
302302
}
303+
304+
// structs with visibility, do not duplicate visibility (#2110).
305+
pub(in self) struct Foo();
306+
pub(super) struct Foo();
307+
pub(crate) struct Foo();

0 commit comments

Comments
 (0)