File: foreigntype-reexport.rs

package info (click to toggle)
rustc 1.85.0%2Bdfsg3-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental, sid, trixie
  • size: 893,396 kB
  • sloc: xml: 158,127; python: 35,830; javascript: 19,497; cpp: 19,002; sh: 17,245; ansic: 13,127; asm: 4,376; makefile: 1,051; perl: 29; lisp: 29; ruby: 19; sql: 11
file content (56 lines) | stat: -rw-r--r-- 1,919 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#![feature(extern_types)]

mod sub {
    extern "C" {
        /// Another extern type.
        pub type C2;
        pub fn f2();
        pub static K: usize;
    }
}

pub mod sub2 {
    extern "C" {
        //@ has foreigntype_reexport/sub2/foreigntype.C.html
        pub type C;
        //@ has foreigntype_reexport/sub2/fn.f.html
        pub fn f();
        //@ has foreigntype_reexport/sub2/static.K3.html
        pub static K3: usize;
    }
}

mod sub3 {
    extern "C" {
        pub type C4;
        pub fn f4();
        pub static K4: usize;
        type X4;
    }
}

//@ has foreigntype_reexport/foreigntype.C2.html
//@ has foreigntype_reexport/fn.f2.html
//@ has foreigntype_reexport/static.K2.html
//@ has foreigntype_reexport/index.html '//a[@class="foreigntype"]' 'C2'
//@ has foreigntype_reexport/index.html '//a[@class="fn"]' 'f2'
//@ has foreigntype_reexport/index.html '//a[@class="static"]' 'K2'
pub use self::sub::{f2, C2, K as K2};

//@ has foreigntype_reexport/index.html '//a[@class="foreigntype"]' 'C'
//@ has foreigntype_reexport/index.html '//a[@class="fn"]' 'f'
//@ has foreigntype_reexport/index.html '//a[@class="static"]' 'K3'
//@ has foreigntype_reexport/index.html '//code' 'pub use self::sub2::C as C3;'
//@ has foreigntype_reexport/index.html '//code' 'pub use self::sub2::f as f3;'
//@ has foreigntype_reexport/index.html '//code' 'pub use self::sub2::K3;'
pub use self::sub2::{f as f3, C as C3, K3};

//@ has foreigntype_reexport/foreigntype.C4.html
//@ has foreigntype_reexport/fn.f4.html
//@ has foreigntype_reexport/static.K4.html
//@ !has foreigntype_reexport/foreigntype.X4.html
//@ has foreigntype_reexport/index.html '//a[@class="foreigntype"]' 'C4'
//@ has foreigntype_reexport/index.html '//a[@class="fn"]' 'f4'
//@ has foreigntype_reexport/index.html '//a[@class="static"]' 'K4'
//@ !has foreigntype_reexport/index.html '//a[@class="foreigntype"]' 'X4'
pub use self::sub3::*;