]> git.lizzy.rs Git - rust.git/blob - tests/mir-opt/const_prop/mutable_variable_aggregate_partial_read.rs
Rollup merge of #106692 - eggyal:mv-binary_heap.rs-binary_heap/mod.rs, r=Mark-Simulacrum
[rust.git] / tests / mir-opt / const_prop / mutable_variable_aggregate_partial_read.rs
1 // unit-test
2 // compile-flags: -O
3
4 // EMIT_MIR mutable_variable_aggregate_partial_read.main.ConstProp.diff
5 fn main() {
6     let mut x: (i32, i32) = foo();
7     x.1 = 99;
8     x.0 = 42;
9     let y = x.1;
10 }
11
12 #[inline(never)]
13 fn foo() -> (i32, i32) {
14     unimplemented!()
15 }