summaryrefslogtreecommitdiffstats
path: root/src/test/mir-opt/dataflow-const-prop/struct.rs
blob: 841b279e03eee7b23195ee77ac5d67846376c691 (plain)
1
2
3
4
5
6
7
8
9
10
11
// unit-test: DataflowConstProp

struct S(i32);

// EMIT_MIR struct.main.DataflowConstProp.diff
fn main() {
    let mut s = S(1);
    let a = s.0 + 2;
    s.0 = 3;
    let b = a + s.0;
}