2022-08-25 11:43:46 -05:00
|
|
|
// unit-test: DataflowConstProp
|
|
|
|
|
|
|
|
// EMIT_MIR if.main.DataflowConstProp.diff
|
|
|
|
fn main() {
|
|
|
|
let a = 1;
|
2022-11-09 11:03:30 -06:00
|
|
|
let b = if a == 1 { 2 } else { 3 };
|
2022-08-25 11:43:46 -05:00
|
|
|
let c = b + 1;
|
|
|
|
|
2022-11-09 11:03:30 -06:00
|
|
|
let d = if a == 1 { a } else { a + 1 };
|
2022-08-25 11:43:46 -05:00
|
|
|
let e = d + 1;
|
|
|
|
}
|