]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc/enum-headings.rs
Rollup merge of #107777 - compiler-errors:derive_const-actually-derive-const, r=fee1...
[rust.git] / tests / rustdoc / enum-headings.rs
1 #![crate_name = "foo"]
2 // @has foo/enum.Token.html
3 /// A token!
4 /// # First
5 /// Some following text...
6 // @has - '//h2[@id="first"]' "First"
7 pub enum Token {
8     /// A declaration!
9     /// # Variant-First
10     /// Some following text...
11     // @has - '//h4[@id="variant-first"]' "Variant-First"
12     Declaration {
13         /// A version!
14         /// # Variant-Field-First
15         /// Some following text...
16         // @has - '//h5[@id="variant-field-first"]' "Variant-Field-First"
17         version: String,
18     },
19     /// A Zoople!
20     /// # Variant-First
21     Zoople(
22         // @has - '//h5[@id="variant-tuple-field-first"]' "Variant-Tuple-Field-First"
23         /// Zoople's first variant!
24         /// # Variant-Tuple-Field-First
25         /// Some following text...
26         usize,
27     ),
28     /// Unfinished business!
29     /// # Non-Exhaustive-First
30     /// Some following text...
31     // @has - '//h4[@id="non-exhaustive-first"]' "Non-Exhaustive-First"
32     #[non_exhaustive]
33     Unfinished {
34         /// This is x.
35         /// # X-First
36         /// Some following text...
37         // @has - '//h5[@id="x-first"]' "X-First"
38         x: usize,
39     },
40 }