diff options
Diffstat (limited to 'tests/ui/transmutability/visibility/should_accept_if_src_has_unreachable_field.rs')
-rw-r--r-- | tests/ui/transmutability/visibility/should_accept_if_src_has_unreachable_field.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/ui/transmutability/visibility/should_accept_if_src_has_unreachable_field.rs b/tests/ui/transmutability/visibility/should_accept_if_src_has_unreachable_field.rs index 9c8345a8e..e7742058c 100644 --- a/tests/ui/transmutability/visibility/should_accept_if_src_has_unreachable_field.rs +++ b/tests/ui/transmutability/visibility/should_accept_if_src_has_unreachable_field.rs @@ -1,3 +1,5 @@ +// check-pass + //! The presence of an unreachable field in the source type (e.g., a public //! field with a private type does not affect transmutability. (This rule is //! distinct from type privacy, which still may forbid naming such types.) @@ -19,7 +21,7 @@ mod src { #[repr(C)] pub(self) struct Zst; // <- unreachable type #[repr(C)] pub(in super) struct Src { - pub(in super) field: Zst, //~ ERROR private type + pub(in super) field: Zst, //~ WARNING type `src::Zst` is more private than the item `Src::field` } } |