1 // unit-test: ConstProp
4 // FIXME(wesleywiser): Ideally, we could const-prop away all of this and just be left with
5 // `let x = 42` but that doesn't work because const-prop doesn't support `Operand::Indirect`
6 // and `InterpCx::eval_place()` always forces an allocation which creates the `Indirect`.
7 // Fixing either of those will allow us to const-prop this away.
9 // EMIT_MIR_FOR_EACH_BIT_WIDTH
10 // EMIT_MIR discriminant.main.ConstProp.diff
12 let x = (if let Some(true) = Some(true) { 42 } else { 10 }) + 0;