mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
13 lines
294 B
Rust
13 lines
294 B
Rust
//@ only-x86_64
|
|
//@ only-windows
|
|
//@ compile-flags: --crate-type lib --emit link
|
|
#[link(name = "foo", kind = "raw-dylib")]
|
|
extern "stdcall" {
|
|
fn f(x: i32);
|
|
//~^ ERROR ABI not supported by `#[link(kind = "raw-dylib")]` on this architecture
|
|
}
|
|
|
|
pub fn lib_main() {
|
|
unsafe { f(42); }
|
|
}
|