about summary refs log tree commit diff
path: root/src/test/rustdoc
diff options
context:
space:
mode:
authorYuki Okushi <jtitor@2k36.org>2022-06-02 06:44:26 +0900
committerGitHub <noreply@github.com>2022-06-02 06:44:26 +0900
commit9fc3fc3a0cf63b9be317f92b84dcaa9b20162279 (patch)
treebc5acefdf6d903a9a9c9a6798150ff07e3fa56f2 /src/test/rustdoc
parent3ed9bbe9700f8ea46528dedb9fb242167b01a802 (diff)
parent434adfff42a3992aaa4c0a1471ee71fb136a61cb (diff)
downloadrust-9fc3fc3a0cf63b9be317f92b84dcaa9b20162279.tar.gz
rust-9fc3fc3a0cf63b9be317f92b84dcaa9b20162279.zip
Rollup merge of #97130 - notriddle:notriddle/collect-trait-impls-dup, r=GuillaumeGomez
rustdoc: avoid including impl blocks with filled-in generics

Fixes #94937

# Before

![image](https://user-images.githubusercontent.com/1593513/168933282-02ccc4ae-9c89-4836-ba34-e2bd83946105.png)

# After

![image](https://user-images.githubusercontent.com/1593513/168933255-4c17407d-d8d1-406e-87f5-9ea809437173.png)
Diffstat (limited to 'src/test/rustdoc')
-rw-r--r--src/test/rustdoc/primitive-slice-auto-trait.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/rustdoc/primitive-slice-auto-trait.rs b/src/test/rustdoc/primitive-slice-auto-trait.rs
new file mode 100644
index 00000000000..b3f511bc1f1
--- /dev/null
+++ b/src/test/rustdoc/primitive-slice-auto-trait.rs
@@ -0,0 +1,14 @@
+// compile-flags: --crate-type lib --edition 2018
+
+#![crate_name = "foo"]
+#![feature(rustdoc_internals)]
+
+// @has foo/primitive.slice.html '//a[@class="primitive"]' 'slice'
+// @has - '//span[@class="in-band"]' 'Primitive Type slice'
+// @has - '//section[@id="main-content"]//div[@class="docblock"]//p' 'this is a test!'
+// @has - '//h2[@id="synthetic-implementations"]' 'Auto Trait Implementations'
+// @has - '//div[@id="synthetic-implementations-list"]//h3' 'impl<T> Send for [T] where T: Send'
+// @has - '//div[@id="synthetic-implementations-list"]//h3' 'impl<T> Sync for [T] where T: Sync'
+#[doc(primitive = "slice")]
+/// this is a test!
+mod slice_prim {}