Skip to content

Commit c9e6b57

Browse files
hovinenbcopybara-github
authored andcommitted
Hide the documentation of internal modules.
This includes the module internal as well as modules which have no non-hidden documented elements. This includes matchers governed by declarative macros, since the macros are documented at the top level rather than in the module itself. Such modules show up on docs.rs as being empty; see, e.g., https://docs.rs/googletest/0.2.0/googletest/matchers/all_matcher/index.html. PiperOrigin-RevId: 503967418
1 parent 8c3406c commit c9e6b57

File tree

8 files changed

+30
-0
lines changed

8 files changed

+30
-0
lines changed

googletest/src/internal/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
#![doc(hidden)]
16+
1517
pub mod source_location;
1618
pub mod test_outcome;

googletest/src/matchers/all_matcher.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
// There are no visible documentation elements in this module; the declarative
16+
// macro is documented at the top level.
17+
#![doc(hidden)]
18+
1519
/// Matches a value which all of the given matchers match.
1620
///
1721
/// For example:

googletest/src/matchers/elements_are_matcher.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
// There are no visible documentation elements in this module; the declarative
16+
// macro is documented at the top level.
17+
#![doc(hidden)]
18+
1519
/// Matches a container's elements to each matcher in order.
1620
///
1721
/// ```rust

googletest/src/matchers/field_matcher.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
// There are no visible documentation elements in this module; the declarative
16+
// macro is documented at the top level.
17+
#![doc(hidden)]
18+
1519
/// Matches a structure or enum with a given field which is matched by a given
1620
/// matcher.
1721
///

googletest/src/matchers/matches_pattern.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
// There are no visible documentation elements in this module; the declarative
16+
// macro is documented at the top level.
17+
#![doc(hidden)]
18+
1519
/// Matches a value according to a pattern of matchers.
1620
///
1721
/// This can be used to match arbitrary combinations of fields on structures

googletest/src/matchers/pointwise_matcher.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
// There are no visible documentation elements in this module; the declarative
16+
// macro is documented at the top level.
17+
#![doc(hidden)]
18+
1519
/// Generates a matcher which matches a container each of whose elements match
1620
/// the given matcher name applied respectively to each element of the given
1721
/// container.

googletest/src/matchers/tuple_matcher.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
// There are no visible documentation elements in this module; the declarative
16+
// macro is documented at the top level.
17+
#![doc(hidden)]
18+
1519
/// Matches a tuple whose elements are matched by each of the given matchers.
1620
///
1721
/// ```rust

googletest/src/matchers/unordered_elements_are_matcher.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
// There are no visible documentation elements in this module; the declarative
16+
// macro is documented at the top level.
17+
#![doc(hidden)]
18+
1519
/// Matches a container whose elements in any order have a 1:1 correspondence
1620
/// with the provided element matchers.
1721
///

0 commit comments

Comments
 (0)