about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-08-30 05:23:54 +0000
committerbors <bors@rust-lang.org>2021-08-30 05:23:54 +0000
commitdbb0fe9d803f7fa8688b33306266a6b054c2c3f4 (patch)
tree1b6091c24eb6f6ce11ec9c4d00b253f070ab9d96 /src/test
parent9556d7a09a7e80e84430071b29d118f39dde8205 (diff)
parent6aacbd87f4b9a5f0472c1b8c63414a0044b50bfd (diff)
downloadrust-dbb0fe9d803f7fa8688b33306266a6b054c2c3f4.tar.gz
rust-dbb0fe9d803f7fa8688b33306266a6b054c2c3f4.zip
Auto merge of #88456 - inquisitivecrystal:private-macro, r=jyn514
Fix: don't document private macros by default

As part of #88019, I made it so private macros are documented in `--document-private-items` mode. Unfortunately, it appears that I also accidentally made them be documented when *not* in `--document-private-items` mode. This PR fixes that and adds a regression test.

r? `@jyn514` (I hope you don't mind that I keep sending PRs your way)

Fixes #88453.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/rustdoc/macro-private-not-documented.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/rustdoc/macro-private-not-documented.rs b/src/test/rustdoc/macro-private-not-documented.rs
new file mode 100644
index 00000000000..ae8b0e7229f
--- /dev/null
+++ b/src/test/rustdoc/macro-private-not-documented.rs
@@ -0,0 +1,19 @@
+// Checks that private macros aren't documented by default. They
+// should be still be documented in `--document-private-items` mode,
+// but that's tested in `macro-document-private.rs`.
+//
+//
+// This is a regression text for issue #88453.
+#![feature(decl_macro)]
+
+// @!has macro_private_not_documented/index.html 'a_macro'
+// @!has macro_private_not_documented/macro.a_macro.html
+macro_rules! a_macro {
+    () => ()
+}
+
+// @!has macro_private_not_documented/index.html 'another_macro'
+// @!has macro_private_not_documented/macro.another_macro.html
+macro another_macro {
+    () => ()
+}