rust/tests/ui/rfcs/rfc-1717-dllimport/1717-dllimport/library-override.rs
2023-06-05 16:09:46 +00:00

15 lines
312 B
Rust

// run-pass
// ignore-wasm32-bare no libc to test ffi with
// compile-flags: -lstatic=wronglibrary:rust_test_helpers
#[link(name = "wronglibrary", kind = "dylib")]
extern "C" {
pub fn rust_dbg_extern_identity_u32(x: u32) -> u32;
}
fn main() {
unsafe {
rust_dbg_extern_identity_u32(42);
}
}