]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc/primitive-tuple-auto-trait.rs
Rollup merge of #107412 - tshepang:needless-check, r=wesleywiser
[rust.git] / tests / rustdoc / primitive-tuple-auto-trait.rs
1 // compile-flags: --crate-type lib --edition 2018
2
3 #![crate_name = "foo"]
4 #![feature(rustdoc_internals)]
5
6 // @has foo/primitive.tuple.html '//a[@class="primitive"]' 'tuple'
7 // @has - '//h1' 'Primitive Type tuple'
8 // @has - '//section[@id="main-content"]//div[@class="docblock"]//p' 'this is a test!'
9 // @has - '//h2[@id="synthetic-implementations"]' 'Auto Trait Implementations'
10 // @has - '//div[@id="synthetic-implementations-list"]//h3' 'Send'
11 // @has - '//div[@id="synthetic-implementations-list"]//h3' 'Sync'
12 #[doc(primitive = "tuple")]
13 /// this is a test!
14 ///
15 // Hardcoded anchor to header written in library/core/src/primitive_docs.rs
16 // @has - '//h2[@id="trait-implementations-1"]' 'Trait implementations'
17 /// # Trait implementations
18 ///
19 /// This header is hard-coded in the HTML format linking for `#[doc(fake_variadics)]`.
20 /// To make sure it gets linked correctly, we need to make sure the hardcoded anchor
21 /// in the code matches what rustdoc generates for the header.
22 mod tuple_prim {}