1 // revisions: public private
2 // [private]compile-flags: --document-private-items
5 // There are 4 cases here:
6 // 1. public item -> public type: no warning
7 // 2. public item -> private type: warning
8 // 3. private item -> public type: no warning
9 // 4. private item -> private type: no warning
10 // All 4 cases are tested with and without --document-private-items.
12 // Case 4 without --document-private-items is the one described in issue #74134.
15 pub struct PublicType;
20 //~^ WARNING public documentation for `public_item` links to private item `PrivateType`
28 // The following cases are identical to the ones above, except that they are in a private
29 // module. Thus they all fall into cases 3 and 4 and should not produce a warning.
33 /// [`super::PublicType`]
34 /// [`super::PrivateType`]
37 /// [`super::PublicType`]
38 /// [`super::PrivateType`]