diff --git a/Cargo.toml b/Cargo.toml index d78ce46f0f..ecc8deedf3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,6 @@ license = "MIT/Apache-2.0" name = "miri" repository = "https://github.com/rust-lang/miri" version = "0.1.0" -build = "build.rs" default-run = "miri" edition = "2018" diff --git a/test-cargo-miri/build.rs b/test-cargo-miri/build.rs new file mode 100644 index 0000000000..950fc3c82b --- /dev/null +++ b/test-cargo-miri/build.rs @@ -0,0 +1,15 @@ +#![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"); +}