rust/src/test/auxiliary/anon-extern-mod-cross-crate-1.rs
Tim Chevalier 451da07718 Allow anonymous extern mods
Now you can write:

extern {
  f() -> int;
}

and f will be accessible in the enclosing scope.
2012-09-04 16:41:19 -07:00

10 lines
162 B
Rust

#[abi = "cdecl"];
#[link_name = "rustrt"];
#[link(name = "anonexternmod",
vers = "0.1")];
#[crate_type = "lib"];
extern {
fn last_os_error() -> ~str;
}