about summary refs log tree commit diff
path: root/tests/rustdoc/primitive/primitive-tuple-auto-trait.rs
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2025-05-05 17:18:50 +0200
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2025-05-05 17:47:18 +0200
commite245c3bc6bb7d278106649be9a03fc9b374e196b (patch)
tree77a6d76d3f0dea1502360d0b28a5ee830656de94 /tests/rustdoc/primitive/primitive-tuple-auto-trait.rs
parent4b6bc735079bc07928efe791fecc9ec6cba81fe1 (diff)
downloadrust-e245c3bc6bb7d278106649be9a03fc9b374e196b.tar.gz
rust-e245c3bc6bb7d278106649be9a03fc9b374e196b.zip
Move primitive rustdoc tests into the `primitive` sub folder
Diffstat (limited to 'tests/rustdoc/primitive/primitive-tuple-auto-trait.rs')
-rw-r--r--tests/rustdoc/primitive/primitive-tuple-auto-trait.rs22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/rustdoc/primitive/primitive-tuple-auto-trait.rs b/tests/rustdoc/primitive/primitive-tuple-auto-trait.rs
new file mode 100644
index 00000000000..51300bd6b2f
--- /dev/null
+++ b/tests/rustdoc/primitive/primitive-tuple-auto-trait.rs
@@ -0,0 +1,22 @@
+//@ compile-flags: --crate-type lib
+//@ edition: 2018
+
+#![crate_name = "foo"]
+#![feature(rustc_attrs)]
+
+//@ has foo/primitive.tuple.html '//h1' 'Primitive Type tuple'
+//@ 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' 'Send'
+//@ has - '//div[@id="synthetic-implementations-list"]//h3' 'Sync'
+#[rustc_doc_primitive = "tuple"]
+/// this is a test!
+///
+// Hardcoded anchor to header written in library/core/src/primitive_docs.rs
+//@ has - '//h2[@id="trait-implementations-1"]' 'Trait implementations'
+/// # Trait implementations
+///
+/// This header is hard-coded in the HTML format linking for `#[doc(fake_variadics)]`.
+/// To make sure it gets linked correctly, we need to make sure the hardcoded anchor
+/// in the code matches what rustdoc generates for the header.
+mod tuple_prim {}