diff options
Diffstat (limited to 'tests/run-make/export/simple/libr.rs')
| -rw-r--r-- | tests/run-make/export/simple/libr.rs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/run-make/export/simple/libr.rs b/tests/run-make/export/simple/libr.rs new file mode 100644 index 00000000000..e10b76a6e52 --- /dev/null +++ b/tests/run-make/export/simple/libr.rs @@ -0,0 +1,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 + } + } +} |
