]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc/foreigntype-reexport.rs
Rollup merge of #107773 - Mark-Simulacrum:rename-auto-template, r=estebank
[rust.git] / tests / rustdoc / foreigntype-reexport.rs
1 #![feature(extern_types)]
2
3 mod sub {
4     extern "C" {
5         /// Another extern type.
6         pub type C2;
7         pub fn f2();
8         pub static K: usize;
9     }
10 }
11
12 pub mod sub2 {
13     extern "C" {
14         // @has foreigntype_reexport/sub2/foreigntype.C.html
15         pub type C;
16         // @has foreigntype_reexport/sub2/fn.f.html
17         pub fn f();
18         // @has foreigntype_reexport/sub2/static.K3.html
19         pub static K3: usize;
20     }
21 }
22
23 mod sub3 {
24     extern "C" {
25         pub type C4;
26         pub fn f4();
27         pub static K4: usize;
28         type X4;
29     }
30 }
31
32 // @has foreigntype_reexport/foreigntype.C2.html
33 // @has foreigntype_reexport/fn.f2.html
34 // @has foreigntype_reexport/static.K2.html
35 // @has foreigntype_reexport/index.html '//a[@class="foreigntype"]' 'C2'
36 // @has foreigntype_reexport/index.html '//a[@class="fn"]' 'f2'
37 // @has foreigntype_reexport/index.html '//a[@class="static"]' 'K2'
38 pub use self::sub::{f2, C2, K as K2};
39
40 // @has foreigntype_reexport/index.html '//a[@class="foreigntype"]' 'C'
41 // @has foreigntype_reexport/index.html '//a[@class="fn"]' 'f'
42 // @has foreigntype_reexport/index.html '//a[@class="static"]' 'K3'
43 // @has foreigntype_reexport/index.html '//code' 'pub use self::sub2::C as C3;'
44 // @has foreigntype_reexport/index.html '//code' 'pub use self::sub2::f as f3;'
45 // @has foreigntype_reexport/index.html '//code' 'pub use self::sub2::K3;'
46 pub use self::sub2::{f as f3, C as C3, K3};
47
48 // @has foreigntype_reexport/foreigntype.C4.html
49 // @has foreigntype_reexport/fn.f4.html
50 // @has foreigntype_reexport/static.K4.html
51 // @!has foreigntype_reexport/foreigntype.X4.html
52 // @has foreigntype_reexport/index.html '//a[@class="foreigntype"]' 'C4'
53 // @has foreigntype_reexport/index.html '//a[@class="fn"]' 'f4'
54 // @has foreigntype_reexport/index.html '//a[@class="static"]' 'K4'
55 // @!has foreigntype_reexport/index.html '//a[@class="foreigntype"]' 'X4'
56 pub use self::sub3::*;