mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 00:34:06 +00:00
84ac80f192
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
18 lines
493 B
Rust
18 lines
493 B
Rust
//@ ignore-cross-compile
|
|
|
|
use run_make_support::{assert_contains, rfs, run, rustc};
|
|
|
|
fn main() {
|
|
// The tests must pass...
|
|
rustc().input("main.rs").run();
|
|
run("main");
|
|
|
|
// ... and the loads/stores must not be optimized out.
|
|
rustc().input("main.rs").emit("llvm-ir").run();
|
|
|
|
let raw_llvm_ir = rfs::read("main.ll");
|
|
let llvm_ir = String::from_utf8_lossy(&raw_llvm_ir);
|
|
assert_contains(&llvm_ir, "load volatile");
|
|
assert_contains(&llvm_ir, "store volatile");
|
|
}
|