about summary refs log tree commit diff
diff options
context:
space:
mode:
authorCamelid <camelidcamel@gmail.com>2020-12-31 12:04:13 -0800
committerCamelid <camelidcamel@gmail.com>2020-12-31 12:08:20 -0800
commit5604a18a60fc99a4a7feb82a280546971adda52d (patch)
tree6301b8a6fd9a838b0022e265237e89fc351ae0d1
parentdda887a02c7df86f6e713d853b887d79be8cf803 (diff)
downloadrust-5604a18a60fc99a4a7feb82a280546971adda52d.tar.gz
rust-5604a18a60fc99a4a7feb82a280546971adda52d.zip
Add `@!has` checks to ensure private items don't have `pub`
-rw-r--r--src/test/rustdoc/visibility.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/rustdoc/visibility.rs b/src/test/rustdoc/visibility.rs
index ebb314a7941..59427693c5a 100644
--- a/src/test/rustdoc/visibility.rs
+++ b/src/test/rustdoc/visibility.rs
@@ -23,8 +23,10 @@ mod a {
     // @has 'foo/a/struct.FooAInSuper.html' '//pre' 'pub(crate) struct FooAInSuper'
     pub(in super) struct FooAInSuper;
     // @has 'foo/a/struct.FooAInA.html' '//pre' 'struct FooAInA'
+    // @!has 'foo/a/struct.FooAInA.html' '//pre' 'pub'
     pub(in a) struct FooAInA;
     // @has 'foo/a/struct.FooAPriv.html' '//pre' 'struct FooAPriv'
+    // @!has 'foo/a/struct.FooAPriv.html' '//pre' 'pub'
     struct FooAPriv;
 
     mod b {
@@ -33,8 +35,10 @@ mod a {
         // @has 'foo/a/b/struct.FooBInSuperSuper.html' '//pre' 'pub(crate) struct FooBInSuperSuper'
         pub(in super::super) struct FooBInSuperSuper;
         // @has 'foo/a/b/struct.FooBInAB.html' '//pre' 'struct FooBInAB'
+        // @!has 'foo/a/b/struct.FooBInAB.html' '//pre' 'pub'
         pub(in a::b) struct FooBInAB;
         // @has 'foo/a/b/struct.FooBPriv.html' '//pre' 'struct FooBPriv'
+        // @!has 'foo/a/b/struct.FooBPriv.html' '//pre' 'pub'
         struct FooBPriv;
     }
 }