about summary refs log tree commit diff
path: root/src/test/rustdoc
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-04-01 17:19:15 +0000
committerbors <bors@rust-lang.org>2022-04-01 17:19:15 +0000
commit297a8018b525c28ef10ee6a91d61954839b508b9 (patch)
treec34e18a769e70d916ce028e679aa19fe7d94523d /src/test/rustdoc
parent99da9aec246e6b500a4e589e4b9096306bb89b07 (diff)
parentc6750e491c683aa208f908c496a675dc2eceb005 (diff)
downloadrust-297a8018b525c28ef10ee6a91d61954839b508b9.tar.gz
rust-297a8018b525c28ef10ee6a91d61954839b508b9.zip
Auto merge of #95552 - matthiaskrgr:rollup-bxminn9, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - #95032 (Clean up, categorize and sort unstable features in std.)
 - #95260 (Better suggestions for `Fn`-family trait selection errors)
 - #95293 (suggest wrapping single-expr blocks in square brackets)
 - #95344 (Make `impl Debug for rustdoc::clean::Item` easier to read)
 - #95388 (interpret: make isize::MAX the limit for dynamic value sizes)
 - #95530 (rustdoc: do not show primitives and keywords as private)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'src/test/rustdoc')
-rw-r--r--src/test/rustdoc/keyword.rs1
-rw-r--r--src/test/rustdoc/primitive.rs21
2 files changed, 22 insertions, 0 deletions
diff --git a/src/test/rustdoc/keyword.rs b/src/test/rustdoc/keyword.rs
index 29ceda4f7c1..1cebe4c6797 100644
--- a/src/test/rustdoc/keyword.rs
+++ b/src/test/rustdoc/keyword.rs
@@ -12,6 +12,7 @@
 // @has foo/index.html '//a/@href' '../foo/index.html'
 // @!has foo/foo/index.html
 // @!has-dir foo/foo
+// @!has foo/index.html '//span' '🔒'
 #[doc(keyword = "match")]
 /// this is a test!
 mod foo{}
diff --git a/src/test/rustdoc/primitive.rs b/src/test/rustdoc/primitive.rs
new file mode 100644
index 00000000000..605ca4d170b
--- /dev/null
+++ b/src/test/rustdoc/primitive.rs
@@ -0,0 +1,21 @@
+#![crate_name = "foo"]
+
+#![feature(rustdoc_internals)]
+
+// @has foo/index.html '//h2[@id="primitives"]' 'Primitive Types'
+// @has foo/index.html '//a[@href="primitive.i32.html"]' 'i32'
+// @has foo/index.html '//div[@class="sidebar-elems"]//li/a' 'Primitive Types'
+// @has foo/index.html '//div[@class="sidebar-elems"]//li/a/@href' '#primitives'
+// @has foo/primitive.i32.html '//a[@class="primitive"]' 'i32'
+// @has foo/primitive.i32.html '//span[@class="in-band"]' 'Primitive Type i32'
+// @has foo/primitive.i32.html '//section[@id="main-content"]//div[@class="docblock"]//p' 'this is a test!'
+// @has foo/index.html '//a/@href' '../foo/index.html'
+// @!has foo/index.html '//span' '🔒'
+#[doc(primitive = "i32")]
+/// this is a test!
+mod i32{}
+
+// @has foo/primitive.bool.html '//section[@id="main-content"]//div[@class="docblock"]//p' 'hello'
+#[doc(primitive = "bool")]
+/// hello
+mod bool {}