1 // unit-test: EarlyOtherwiseBranch
2 // EMIT_MIR early_otherwise_branch.opt1.EarlyOtherwiseBranch.diff
3 fn opt1(x: Option<u32>, y: Option<u32>) -> u32 {
5 (Some(a), Some(b)) => 0,
10 // EMIT_MIR early_otherwise_branch.opt2.EarlyOtherwiseBranch.diff
11 fn opt2(x: Option<u32>, y: Option<u32>) -> u32 {
13 (Some(a), Some(b)) => 0,
19 // optimize despite different types
20 // EMIT_MIR early_otherwise_branch.opt3.EarlyOtherwiseBranch.diff
21 fn opt3(x: Option<u32>, y: Option<bool>) -> u32 {
23 (Some(a), Some(b)) => 0,
31 opt3(None, Some(false));