88f29aab27
This patch changes how to specify ABI and link name of a native module. Before: native "cdecl" mod llvm = "rustllvm" {...} After: #[abi = "cdecl"] #[link_name = "rustllvm"] native mod llvm {...} The old optional syntax for ABI and link name is no longer supported. Fixes issue #547
14 lines
171 B
Rust
14 lines
171 B
Rust
// -*- rust -*-
|
|
// error-pattern: unsafe functions can only be called
|
|
|
|
#[abi = "cdecl"]
|
|
native mod test {
|
|
unsafe fn free();
|
|
}
|
|
|
|
fn main() {
|
|
let x = test::free;
|
|
}
|
|
|
|
|