1 // unit-test: EarlyOtherwiseBranch
3 // FIXME: This test was broken by the derefer change.
8 pub enum ViewportPercentageLength {
15 // EMIT_MIR early_otherwise_branch_68867.try_sum.EarlyOtherwiseBranch.diff
17 pub extern "C" fn try_sum(
18 x: &ViewportPercentageLength,
19 other: &ViewportPercentageLength,
20 ) -> Result<ViewportPercentageLength, ()> {
21 use self::ViewportPercentageLength::*;
23 (&Vw(one), &Vw(other)) => Vw(one + other),
24 (&Vh(one), &Vh(other)) => Vh(one + other),
25 (&Vmin(one), &Vmin(other)) => Vmin(one + other),
26 (&Vmax(one), &Vmax(other)) => Vmax(one + other),
32 try_sum(&ViewportPercentageLength::Vw(1.0), &ViewportPercentageLength::Vw(2.0));