]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc/src-links.rs
Rollup merge of #107580 - lenko-d:default_value_for_a_lifetime_generic_parameter_prod...
[rust.git] / tests / rustdoc / src-links.rs
1 #![crate_name = "foo"]
2
3 //! Dox
4 // @has src/foo/src-links.rs.html
5 // @has foo/index.html '//a/@href' '../src/foo/src-links.rs.html'
6
7 #[path = "src-links/mod.rs"]
8 pub mod qux;
9
10 // @has src/foo/src-links.rs.html
11 // @has foo/fizz/index.html '//a/@href' '../src/foo/src-links/fizz.rs.html'
12 #[path = "src-links/../src-links/fizz.rs"]
13 pub mod fizz;
14
15 // @has foo/bar/index.html '//a/@href' '../../src/foo/src-links.rs.html'
16 pub mod bar {
17
18     /// Dox
19     // @has foo/bar/baz/index.html '//a/@href' '../../../src/foo/src-links.rs.html'
20     pub mod baz {
21         /// Dox
22         // @has foo/bar/baz/fn.baz.html '//a/@href' '../../../src/foo/src-links.rs.html'
23         pub fn baz() { }
24     }
25
26     /// Dox
27     // @has foo/bar/trait.Foobar.html '//a/@href' '../../src/foo/src-links.rs.html'
28     pub trait Foobar { fn dummy(&self) { } }
29
30     // @has foo/bar/struct.Foo.html '//a/@href' '../../src/foo/src-links.rs.html'
31     pub struct Foo { x: i32, y: u32 }
32
33     // @has foo/bar/fn.prawns.html '//a/@href' '../../src/foo/src-links.rs.html'
34     pub fn prawns((a, b): (i32, u32), Foo { x, y }: Foo) { }
35 }
36
37 /// Dox
38 // @has foo/fn.modfn.html '//a/@href' '../src/foo/src-links.rs.html'
39 pub fn modfn() { }
40
41 // same hierarchy as above, but just for the submodule
42
43 // @has src/foo/src-links/mod.rs.html
44 // @has foo/qux/index.html '//a/@href' '../../src/foo/src-links/mod.rs.html'
45 // @has foo/qux/bar/index.html '//a/@href' '../../../src/foo/src-links/mod.rs.html'
46 // @has foo/qux/bar/baz/index.html '//a/@href' '../../../../src/foo/src-links/mod.rs.html'
47 // @has foo/qux/bar/baz/fn.baz.html '//a/@href' '../../../../src/foo/src-links/mod.rs.html'
48 // @has foo/qux/bar/trait.Foobar.html '//a/@href' '../../../src/foo/src-links/mod.rs.html'
49 // @has foo/qux/bar/struct.Foo.html '//a/@href' '../../../src/foo/src-links/mod.rs.html'
50 // @has foo/qux/bar/fn.prawns.html '//a/@href' '../../../src/foo/src-links/mod.rs.html'
51 // @has foo/qux/fn.modfn.html '//a/@href' '../../src/foo/src-links/mod.rs.html'