]> git.proxmox.com Git - rustc.git/blob - src/test/rustdoc/src-links.rs
New upstream version 1.34.2+dfsg1
[rustc.git] / src / test / 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 foo/bar/index.html '//a/@href' '../../src/foo/src-links.rs.html'
11 pub mod bar {
12
13 /// Dox
14 // @has foo/bar/baz/index.html '//a/@href' '../../../src/foo/src-links.rs.html'
15 pub mod baz {
16 /// Dox
17 // @has foo/bar/baz/fn.baz.html '//a/@href' '../../../src/foo/src-links.rs.html'
18 pub fn baz() { }
19 }
20
21 /// Dox
22 // @has foo/bar/trait.Foobar.html '//a/@href' '../../src/foo/src-links.rs.html'
23 pub trait Foobar { fn dummy(&self) { } }
24
25 // @has foo/bar/struct.Foo.html '//a/@href' '../../src/foo/src-links.rs.html'
26 pub struct Foo { x: i32, y: u32 }
27
28 // @has foo/bar/fn.prawns.html '//a/@href' '../../src/foo/src-links.rs.html'
29 pub fn prawns((a, b): (i32, u32), Foo { x, y }: Foo) { }
30 }
31
32 /// Dox
33 // @has foo/fn.modfn.html '//a/@href' '../src/foo/src-links.rs.html'
34 pub fn modfn() { }
35
36 // same hierarchy as above, but just for the submodule
37
38 // @has src/foo/src-links/mod.rs.html
39 // @has foo/qux/index.html '//a/@href' '../../src/foo/src-links/mod.rs.html'
40 // @has foo/qux/bar/index.html '//a/@href' '../../../src/foo/src-links/mod.rs.html'
41 // @has foo/qux/bar/baz/index.html '//a/@href' '../../../../src/foo/src-links/mod.rs.html'
42 // @has foo/qux/bar/baz/fn.baz.html '//a/@href' '../../../../src/foo/src-links/mod.rs.html'
43 // @has foo/qux/bar/trait.Foobar.html '//a/@href' '../../../src/foo/src-links/mod.rs.html'
44 // @has foo/qux/bar/struct.Foo.html '//a/@href' '../../../src/foo/src-links/mod.rs.html'
45 // @has foo/qux/bar/fn.prawns.html '//a/@href' '../../../src/foo/src-links/mod.rs.html'
46 // @has foo/qux/fn.modfn.html '//a/@href' '../../src/foo/src-links/mod.rs.html'