1 #[derive(Debug, PartialEq)]
3 Unit(()), // Force non-C-enum representation.
6 fn return_unit() -> Unit {
10 #[derive(Debug, PartialEq)]
12 False(()), // Force non-C-enum representation.
16 fn return_true() -> MyBool {
20 fn return_false() -> MyBool {
24 fn return_none() -> Option<i64> {
28 fn return_some() -> Option<i64> {
32 fn match_opt_none() -> i8 {
40 fn match_opt_some() -> i8 {
48 fn two_nones() -> (Option<i16>, Option<i16>) {
53 assert_eq!(two_nones(), (None, None));
54 assert_eq!(match_opt_some(), 13);
55 assert_eq!(match_opt_none(), 42);
56 assert_eq!(return_some(), Some(42));
57 assert_eq!(return_none(), None);
58 assert_eq!(return_false(), MyBool::False(()));
59 assert_eq!(return_true(), MyBool::True(()));
60 assert_eq!(return_unit(), Unit::Unit(()));