]> git.lizzy.rs Git - rust.git/blob - src/test/ui/abi/extern/extern-pass-char.rs
Rollup merge of #95353 - jyn514:invalid-filter-hard-error, r=Mark-Simulacrum
[rust.git] / src / test / ui / abi / extern / extern-pass-char.rs
1 // run-pass
2 // ignore-wasm32-bare no libc for ffi testing
3
4 // Test a function that takes/returns a u8.
5
6 #[link(name = "rust_test_helpers", kind = "static")]
7 extern "C" {
8     pub fn rust_dbg_extern_identity_u8(v: u8) -> u8;
9 }
10
11 pub fn main() {
12     unsafe {
13         assert_eq!(22, rust_dbg_extern_identity_u8(22));
14     }
15 }