mirror of
https://git.proxmox.com/git/rustc
synced 2025-08-16 19:57:10 +00:00
15 lines
220 B
Rust
15 lines
220 B
Rust
//@ run-pass
|
|
|
|
#[link(name = "rust_test_helpers", kind = "static")]
|
|
extern "C" {
|
|
fn rust_int8_to_int32(_: i8) -> i32;
|
|
}
|
|
|
|
fn main() {
|
|
let x = unsafe {
|
|
rust_int8_to_int32(-1)
|
|
};
|
|
|
|
assert!(x == -1);
|
|
}
|