]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/const_prop/mutable_variable_unprop_assign.rs
rustc_codegen_llvm: Give each codegen unit a unique DWARF name on all
[rust.git] / src / test / mir-opt / const_prop / mutable_variable_unprop_assign.rs
1 // compile-flags: -O
2
3 // EMIT_MIR mutable_variable_unprop_assign.main.ConstProp.diff
4 fn main() {
5     let a = foo();
6     let mut x: (i32, i32) = (1, 2);
7     x.1 = a;
8     let y = x.1;
9     let z = x.0; // this could theoretically be allowed, but we can't handle it right now
10 }
11
12 #[inline(never)]
13 fn foo() -> i32 {
14     unimplemented!()
15 }