summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.rs
blob: 9060f7e9bd3e6a8759f3f03e1c030599d1756cb8 (plain)
1
2
3
4
5
6
7
8
9
10
// unit-test
// compile-flags: -O

// EMIT_MIR mutable_variable_aggregate_mut_ref.main.ConstProp.diff
fn main() {
    let mut x = (42, 43);
    let z = &mut x;
    z.1 = 99;
    let y = x;
}