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