()
| 2076 | return Ok(n / 2) |
| 2077 | } |
| 2078 | |
| 2079 | main: () -> i32 { |
| 2080 | match halve(7) { |
| 2081 | Ok(x) -> { |
| 2082 | return x |
| 2083 | } |
| 2084 | Err(e) -> { |
| 2085 | return 0 - e |
| 2086 | } |
| 2087 | } |
| 2088 | return -1 |
| 2089 | } |
| 2090 | "#, |
| 2091 | -7, |
| 2092 | ); |
| 2093 | } |
| 2094 | |
| 2095 | #[test] |
| 2096 | fn inline_constructed_enum_as_call_argument() { |
| 2097 | // A freshly constructed enum passed directly as a call argument. 7 * 7 = 49. |
nothing calls this directly
no test coverage detected