mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 10:13:54 +00:00
433da1fc04
They pass fine.
17 lines
270 B
Rust
17 lines
270 B
Rust
#![feature(rustc_private)]
|
|
|
|
extern crate libc;
|
|
|
|
#[link(name = "foo", kind = "static")]
|
|
extern "C" {
|
|
fn should_return_one() -> libc::c_int;
|
|
}
|
|
|
|
fn main() {
|
|
let result = unsafe { should_return_one() };
|
|
|
|
if result != 1 {
|
|
std::process::exit(255);
|
|
}
|
|
}
|