rust/test-cargo-miri/build.rs
2019-08-28 09:15:31 +02:00

16 lines
277 B
Rust

#![feature(asm)]
fn not_in_miri() -> i32 {
// Inline assembly definitely does not work in Miri.
let dummy = 42;
unsafe {
asm!("" : : "r"(&dummy));
}
return dummy;
}
fn main() {
not_in_miri();
println!("cargo:rerun-if-changed=build.rs");
}