rust/tests/mir-opt/dead-store-elimination/place_mention.rs

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

16 lines
463 B
Rust
Raw Normal View History

// Verify that we account for the `PlaceMention` statement as a use of the tuple,
// and don't remove it as a dead store.
//
//@ test-mir-pass: DeadStoreElimination-initial
//@ compile-flags: -Zmir-preserve-ub
2023-04-25 20:09:41 +00:00
// EMIT_MIR place_mention.main.DeadStoreElimination-initial.diff
2023-04-25 20:09:41 +00:00
fn main() {
// CHECK-LABEL: fn main(
// CHECK-NOT: PlaceMention(
// CHECK: [[tmp:_.*]] =
// CHECK-NEXT: PlaceMention([[tmp:_.*]]);
2023-04-25 20:09:41 +00:00
let (_, _) = ("Hello", "World");
}