Sign in
android
/
toolchain
/
rustc
/
d720b3f2ba07cb42ff7b311589c99daefe3aaa22
/
.
/
tests
/
ui
/
abi
/
cabi-int-widening.rs
blob: 1dbab275225cdb2579ee22f5d995e62c60510fa0 [
file
] [
log
] [
blame
]
// run-pass
// ignore-wasm32-bare no libc to test ffi with
#[
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
);
}