Skip to content

Commit d239ea6

Browse files
camelidMark-Simulacrum
authored andcommitted
Add @!has checks to ensure private items don't have pub
1 parent 6ec4c71 commit d239ea6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/test/rustdoc/visibility.rs

+4
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ mod a {
2323
// @has 'foo/a/struct.FooAInSuper.html' '//pre' 'pub(crate) struct FooAInSuper'
2424
pub(in super) struct FooAInSuper;
2525
// @has 'foo/a/struct.FooAInA.html' '//pre' 'struct FooAInA'
26+
// @!has 'foo/a/struct.FooAInA.html' '//pre' 'pub'
2627
pub(in a) struct FooAInA;
2728
// @has 'foo/a/struct.FooAPriv.html' '//pre' 'struct FooAPriv'
29+
// @!has 'foo/a/struct.FooAPriv.html' '//pre' 'pub'
2830
struct FooAPriv;
2931

3032
mod b {
@@ -33,8 +35,10 @@ mod a {
3335
// @has 'foo/a/b/struct.FooBInSuperSuper.html' '//pre' 'pub(crate) struct FooBInSuperSuper'
3436
pub(in super::super) struct FooBInSuperSuper;
3537
// @has 'foo/a/b/struct.FooBInAB.html' '//pre' 'struct FooBInAB'
38+
// @!has 'foo/a/b/struct.FooBInAB.html' '//pre' 'pub'
3639
pub(in a::b) struct FooBInAB;
3740
// @has 'foo/a/b/struct.FooBPriv.html' '//pre' 'struct FooBPriv'
41+
// @!has 'foo/a/b/struct.FooBPriv.html' '//pre' 'pub'
3842
struct FooBPriv;
3943
}
4044
}

0 commit comments

Comments
 (0)