summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/dataflow-const-prop/self_assign.rs
blob: 8de2195f93ba4b3b3e9e94eb30c510b606377873 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// unit-test: DataflowConstProp

// EMIT_MIR self_assign.main.DataflowConstProp.diff
fn main() {
    let mut a = 0;
    a = a + 1;
    a = a;

    let mut b = &a;
    b = b;
    a = *b;
}