]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc/intra-link-self.rs
Rollup merge of #69603 - chrissimpkins:tidy-docs-update, r=petrochenkov
[rust.git] / src / test / rustdoc / intra-link-self.rs
1 #![crate_name = "foo"]
2
3 // @has foo/index.html '//a/@href' '../foo/struct.Foo.html#method.new'
4 // @has foo/struct.Foo.html '//a/@href' '../foo/struct.Foo.html#method.new'
5
6 /// Use [`new`] to create a new instance.
7 ///
8 /// [`new`]: Self::new
9 pub struct Foo;
10
11 impl Foo {
12     pub fn new() -> Self {
13         unimplemented!()
14     }
15 }
16
17 // @has foo/index.html '//a/@href' '../foo/struct.Bar.html#method.new2'
18 // @has foo/struct.Bar.html '//a/@href' '../foo/struct.Bar.html#method.new2'
19
20 /// Use [`new2`] to create a new instance.
21 ///
22 /// [`new2`]: Self::new2
23 pub struct Bar;
24
25 impl Bar {
26     pub fn new2() -> Self {
27         unimplemented!()
28     }
29 }