]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc/const-doc.rs
Rollup merge of #104672 - Voultapher:unify-sort-modules, r=thomcc
[rust.git] / tests / rustdoc / const-doc.rs
1 use std::marker::PhantomData;
2
3 pub struct Foo<'a> {
4     f: PhantomData<&'a u32>,
5 }
6
7 pub struct ContentType {
8     pub ttype: Foo<'static>,
9     pub subtype: Foo<'static>,
10     pub params: Option<Foo<'static>>,
11 }
12
13 impl ContentType {
14     // @has const_doc/struct.ContentType.html
15     // @has  - '//*[@id="associatedconstant.Any"]' 'const Any: ContentType'
16     pub const Any: ContentType = ContentType { ttype: Foo { f: PhantomData, },
17                                                subtype: Foo { f: PhantomData, },
18                                                params: None, };
19 }