2023-06-08 02:18:34 -05:00
|
|
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
2024-04-20 06:19:34 -05:00
|
|
|
//@ test-mir-pass: RemoveStorageMarkers
|
2022-08-02 19:44:25 -05:00
|
|
|
|
2021-01-12 18:00:00 -06:00
|
|
|
// 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 12:04:39 -06:00
|
|
|
// CHECK-LABEL: fn main(
|
2024-01-28 13:47:52 -06:00
|
|
|
|
|
|
|
// CHECK-NOT: StorageDead
|
|
|
|
// CHECK-NOT: StorageLive
|
2021-01-12 18:00:00 -06:00
|
|
|
let mut sum = 0;
|
|
|
|
for i in 0..10 {
|
|
|
|
sum += i;
|
|
|
|
}
|
|
|
|
}
|