]>
Commit | Line | Data |
---|---|---|
9346a6ac AL |
1 | // Copyright 2015 The Rust Project Developers. See the COPYRIGHT |
2 | // file at the top-level directory of this distribution and at | |
3 | // http://rust-lang.org/COPYRIGHT. | |
4 | // | |
5 | // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | |
6 | // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | |
7 | // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | |
8 | // option. This file may not be copied, modified, or distributed | |
9 | // except according to those terms. | |
10 | ||
11 | #![crate_name = "foo"] | |
12 | ||
13 | //! Dox | |
14 | // @has src/foo/src-links.rs.html | |
15 | // @has foo/index.html '//a/@href' '../src/foo/src-links.rs.html' | |
16 | ||
17 | #[path = "src-links/mod.rs"] | |
18 | pub mod qux; | |
19 | ||
20 | // @has foo/bar/index.html '//a/@href' '../../src/foo/src-links.rs.html' | |
21 | pub mod bar { | |
22 | ||
23 | /// Dox | |
24 | // @has foo/bar/baz/index.html '//a/@href' '../../../src/foo/src-links.rs.html' | |
25 | pub mod baz { | |
26 | /// Dox | |
9e0c209e | 27 | // @has foo/bar/baz/baz.v.html |
9346a6ac AL |
28 | // @has foo/bar/baz/fn.baz.html '//a/@href' '../../../src/foo/src-links.rs.html' |
29 | pub fn baz() { } | |
30 | } | |
31 | ||
32 | /// Dox | |
9e0c209e | 33 | // @has foo/bar/Foobar.t.html |
9346a6ac AL |
34 | // @has foo/bar/trait.Foobar.html '//a/@href' '../../src/foo/src-links.rs.html' |
35 | pub trait Foobar { fn dummy(&self) { } } | |
36 | ||
37 | // @has foo/bar/struct.Foo.html '//a/@href' '../../src/foo/src-links.rs.html' | |
38 | pub struct Foo { x: i32, y: u32 } | |
39 | ||
40 | // @has foo/bar/fn.prawns.html '//a/@href' '../../src/foo/src-links.rs.html' | |
41 | pub fn prawns((a, b): (i32, u32), Foo { x, y }: Foo) { } | |
42 | } | |
43 | ||
44 | /// Dox | |
45 | // @has foo/fn.modfn.html '//a/@href' '../src/foo/src-links.rs.html' | |
46 | pub fn modfn() { } | |
47 | ||
48 | // same hierarchy as above, but just for the submodule | |
49 | ||
50 | // @has src/foo/src-links/mod.rs.html | |
51 | // @has foo/qux/index.html '//a/@href' '../../src/foo/src-links/mod.rs.html' | |
52 | // @has foo/qux/bar/index.html '//a/@href' '../../../src/foo/src-links/mod.rs.html' | |
53 | // @has foo/qux/bar/baz/index.html '//a/@href' '../../../../src/foo/src-links/mod.rs.html' | |
54 | // @has foo/qux/bar/baz/fn.baz.html '//a/@href' '../../../../src/foo/src-links/mod.rs.html' | |
55 | // @has foo/qux/bar/trait.Foobar.html '//a/@href' '../../../src/foo/src-links/mod.rs.html' | |
56 | // @has foo/qux/bar/struct.Foo.html '//a/@href' '../../../src/foo/src-links/mod.rs.html' | |
57 | // @has foo/qux/bar/fn.prawns.html '//a/@href' '../../../src/foo/src-links/mod.rs.html' | |
58 | // @has foo/qux/fn.modfn.html '//a/@href' '../../src/foo/src-links/mod.rs.html' |