From 691bc3bbd70acb175ad2f954dd309d3a49dd358e Mon Sep 17 00:00:00 2001 From: topecongiro Date: Fri, 3 Nov 2017 22:25:30 +0900 Subject: [PATCH] Add a test for structs with visibility --- tests/source/structs.rs | 5 +++++ tests/target/structs.rs | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/tests/source/structs.rs b/tests/source/structs.rs index e63de8ecdb43..daf3821c2d97 100644 --- a/tests/source/structs.rs +++ b/tests/source/structs.rs @@ -258,3 +258,8 @@ struct Loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo struct Looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong {} struct Loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong {} struct Loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong { x: i32 } + +// structs with visibility, do not duplicate visibility (#2110). +pub(in self) struct Foo(); +pub(super) struct Foo(); +pub(crate) struct Foo(); diff --git a/tests/target/structs.rs b/tests/target/structs.rs index 5132162f3d51..37bc3bc218b5 100644 --- a/tests/target/structs.rs +++ b/tests/target/structs.rs @@ -300,3 +300,8 @@ struct Loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo { x: i32, } + +// structs with visibility, do not duplicate visibility (#2110). +pub(in self) struct Foo(); +pub(super) struct Foo(); +pub(crate) struct Foo();