2 #![allow(non_camel_case_types)]
3 #![allow(non_shorthand_field_patterns)]
5 enum t1 { a(isize), b(usize), }
6 struct T2 {x: t1, y: isize}
7 enum t3 { c(T2, usize), }
9 fn m(input
: t3
) -> isize {
11 t3
::c(T2 {x: t1::a(m), ..}
, _
) => { return m; }
12 t3
::c(T2 {x: t1::b(m), y: y}
, z
) => { return ((m + z) as isize) + y; }
17 assert_eq
!(m(t3
::c(T2 {x: t1::a(10), y: 5}
, 4)), 10);
18 assert_eq
!(m(t3
::c(T2 {x: t1::b(10), y: 5}
, 4)), 19);