+extern {
+ fn cc_plus_one_c(arg : &u32) -> u32;
+}
+
fn main() {
- println!("Hello, world!");
+ let value : u32 = 41;
+
+ unsafe{
+ println!("Answer to the Ultimate Question of Life, the Universe, and Everything: {}!", cc_plus_one_c(&value));
+ }
}
# HACK(eddyb) sets `RUSTC_BOOTSTRAP=1` so Cargo can accept nightly features.
# These come from the top-level Rust workspace, that this crate is not a
# member of, but Cargo tries to load the workspace `Cargo.toml` anyway.
- env RUSTC_BOOTSTRAP=1 \
+ env RUSTC_BOOTSTRAP=1
cargo -v run --target $TARGET
- env RUSTC_BOOTSTRAP=1 \
- cargo -v run --target $TARGET --release
popd
popd
}
#check "libunwind::Registers_x86_64::jumpto()" jumpto.checks
check "std::io::stdio::_print::h87f0c238421c45bc" print.checks
+check cc_plus_one_c cc_plus_one_c.checks