]>
Commit | Line | Data |
---|---|---|
e74abb32 XL |
1 | // compile-flags: -O |
2 | ||
f035d41b XL |
3 | // FIXME(wesleywiser): Ideally, we could const-prop away all of this and just be left with |
4 | // `let x = 42` but that doesn't work because const-prop doesn't support `Operand::Indirect` | |
5 | // and `InterpCx::eval_place()` always forces an allocation which creates the `Indirect`. | |
6 | // Fixing either of those will allow us to const-prop this away. | |
7 | ||
ba9703b0 XL |
8 | // EMIT_MIR_FOR_EACH_BIT_WIDTH |
9 | // EMIT_MIR rustc.main.ConstProp.diff | |
e74abb32 XL |
10 | fn main() { |
11 | let x = (if let Some(true) = Some(true) { 42 } else { 10 }) + 0; | |
12 | } |