]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc/nested-modules.rs
Rollup merge of #107773 - Mark-Simulacrum:rename-auto-template, r=estebank
[rust.git] / tests / rustdoc / nested-modules.rs
1 #![crate_name = "aCrate"]
2
3 mod a_module {
4     pub fn private_function() {}
5
6     pub use a_module::private_function as other_private_function;
7
8     pub mod a_nested_module {
9         // @has aCrate/a_nested_module/index.html '//a[@href="fn.a_nested_public_function.html"]' 'a_nested_public_function'
10         // @hasraw aCrate/a_nested_module/fn.a_nested_public_function.html 'pub fn a_nested_public_function()'
11         pub fn a_nested_public_function() {}
12
13         // @has aCrate/a_nested_module/index.html '//a[@href="fn.another_nested_public_function.html"]' 'another_nested_public_function'
14         // @hasraw aCrate/a_nested_module/fn.another_nested_public_function.html 'pub fn another_nested_public_function()'
15         pub use a_nested_module::a_nested_public_function as another_nested_public_function;
16     }
17
18     // @!hasraw aCrate/a_nested_module/index.html 'yet_another_nested_public_function'
19     pub use a_nested_module::a_nested_public_function as yet_another_nested_public_function;
20
21     // @!hasraw aCrate/a_nested_module/index.html 'one_last_nested_public_function'
22     pub use a_nested_module::another_nested_public_function as one_last_nested_public_function;
23 }
24
25 // @!hasraw aCrate/index.html 'a_module'
26 // @has aCrate/index.html '//a[@href="a_nested_module/index.html"]' 'a_nested_module'
27 pub use a_module::a_nested_module;
28
29 // @has aCrate/index.html '//a[@href="fn.a_nested_public_function.html"]' 'a_nested_public_function'
30 // @has aCrate/index.html '//a[@href="fn.another_nested_public_function.html"]' 'another_nested_public_function'
31 // @has aCrate/index.html '//a[@href="fn.yet_another_nested_public_function.html"]' 'yet_another_nested_public_function'
32 // @has aCrate/index.html '//a[@href="fn.one_last_nested_public_function.html"]' 'one_last_nested_public_function'
33 pub use a_module::{
34     a_nested_module::{a_nested_public_function, another_nested_public_function},
35     one_last_nested_public_function, yet_another_nested_public_function,
36 };
37
38 // @has aCrate/index.html '//a[@href="fn.private_function.html"]' 'private_function'
39 // @!hasraw aCrate/fn.private_function.html 'a_module'
40 // @has aCrate/index.html '//a[@href="fn.other_private_function.html"]' 'other_private_function'
41 // @!hasraw aCrate/fn.other_private_function.html 'a_module'
42 pub use a_module::{other_private_function, private_function};