1 // compile-flags: -Z mir-opt-level=4 -Zunsound-mir-opts
6 pub enum ViewportPercentageLength {
13 // EMIT_MIR early_otherwise_branch_68867.try_sum.EarlyOtherwiseBranch.diff
14 // EMIT_MIR early_otherwise_branch_68867.try_sum EarlyOtherwiseBranch.before SimplifyConstCondition-final.after
16 pub extern "C" fn try_sum(
17 x: &ViewportPercentageLength,
18 other: &ViewportPercentageLength,
19 ) -> Result<ViewportPercentageLength, ()> {
20 use self::ViewportPercentageLength::*;
22 (&Vw(one), &Vw(other)) => Vw(one + other),
23 (&Vh(one), &Vh(other)) => Vh(one + other),
24 (&Vmin(one), &Vmin(other)) => Vmin(one + other),
25 (&Vmax(one), &Vmax(other)) => Vmax(one + other),
31 try_sum(&ViewportPercentageLength::Vw(1.0), &ViewportPercentageLength::Vw(2.0));