rust/tests/mir-opt/remove_storage_markers.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
432 B
Rust
Raw Normal View History

// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
//@ test-mir-pass: RemoveStorageMarkers
// Checks that storage markers are removed at opt-level=0.
//
//@ compile-flags: -C opt-level=0 -Coverflow-checks=off
// EMIT_MIR remove_storage_markers.main.RemoveStorageMarkers.diff
fn main() {
2024-02-04 18:04:39 +00:00
// CHECK-LABEL: fn main(
// CHECK-NOT: StorageDead
// CHECK-NOT: StorageLive
let mut sum = 0;
for i in 0..10 {
sum += i;
}
}