We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 104e1a4 + 3ee8498 commit f1eef38Copy full SHA for f1eef38
tests/rustdoc-json/keyword_private.rs
@@ -0,0 +1,20 @@
1
+// Ensure keyword docs are present with --document-private-items
2
+
3
+//@ compile-flags: --document-private-items
4
+#![feature(rustdoc_internals)]
5
6
+// @!has "$.index[*][?(@.name=='match')]"
7
+// @has "$.index[*][?(@.name=='foo')]"
8
+// @is "$.index[*][?(@.name=='foo')].attrs" '["#[doc(keyword = \"match\")]"]'
9
+// @is "$.index[*][?(@.name=='foo')].docs" '"this is a test!"'
10
+#[doc(keyword = "match")]
11
+/// this is a test!
12
+pub mod foo {}
13
14
+// @!has "$.index[*][?(@.name=='hello')]"
15
+// @has "$.index[*][?(@.name=='bar')]"
16
+// @is "$.index[*][?(@.name=='bar')].attrs" '["#[doc(keyword = \"hello\")]"]'
17
+// @is "$.index[*][?(@.name=='bar')].docs" '"hello"'
18
+#[doc(keyword = "hello")]
19
+/// hello
20
+mod bar {}
0 commit comments