about summary refs log tree commit diff
path: root/tests/run-make/export/simple/libr.rs
blob: e10b76a6e52ed33df339cedd0b46134270c0ac8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#![feature(export_stable)]
#![crate_type = "sdylib"]

#[export_stable]
pub mod m {
    #[repr(C)]
    pub struct S {
        pub x: i32,
    }

    pub extern "C" fn foo1(x: S) -> i32 {
        x.x
    }

    pub type Integer = i32;

    impl S {
        pub extern "C" fn foo2(x: Integer) -> Integer {
            x
        }
    }
}