]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc/intra-link-trait-impl.rs
Auto merge of #72208 - tmandry:fix-fuchsia-solink, r=Mark-Simulacrum
[rust.git] / src / test / rustdoc / intra-link-trait-impl.rs
1 #![crate_name = "foo"]
2
3 // ignore-tidy-linelength
4
5 pub struct MyStruct;
6
7 impl MyTrait for MyStruct {
8
9 // @has foo/struct.MyStruct.html '//a/@href' '../foo/struct.MyStruct.html#associatedtype.AssoType'
10
11     /// [`AssoType`]
12     ///
13     /// [`AssoType`]: MyStruct::AssoType
14     type AssoType = u32;
15
16 // @has foo/struct.MyStruct.html '//a/@href' '../foo/struct.MyStruct.html#associatedconstant.ASSO_CONST'
17
18     /// [`ASSO_CONST`]
19     ///
20     /// [`ASSO_CONST`]: MyStruct::ASSO_CONST
21     const ASSO_CONST: i32 = 10;
22
23 // @has foo/struct.MyStruct.html '//a/@href' '../foo/struct.MyStruct.html#method.trait_fn'
24
25     /// [`trait_fn`]
26     ///
27     /// [`trait_fn`]: MyStruct::trait_fn
28     fn trait_fn() { }
29 }
30
31 pub trait MyTrait {
32     type AssoType;
33     const ASSO_CONST: i32 = 1;
34     fn trait_fn();
35 }