about summary refs log tree commit diff
path: root/tests/mir-opt/dead-store-elimination/place_mention.rs
blob: 1848a02829754f14fe3f2d65f9ed1176c147d213 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// 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

// EMIT_MIR place_mention.main.DeadStoreElimination-initial.diff
fn main() {
    // CHECK-LABEL: fn main(
    // CHECK-NOT: PlaceMention(
    // CHECK: [[tmp:_.*]] =
    // CHECK-NEXT: PlaceMention([[tmp:_.*]]);

    let (_, _) = ("Hello", "World");
}