2024-02-16 14:02:50 -06:00
|
|
|
//@ run-pass
|
2022-11-17 09:03:02 -06:00
|
|
|
#![allow(dead_code)]
|
|
|
|
|
|
|
|
enum OpenResult {
|
|
|
|
Ok(()),
|
|
|
|
Err(()),
|
|
|
|
TransportErr(TransportErr),
|
|
|
|
}
|
|
|
|
|
|
|
|
#[repr(i32)]
|
|
|
|
enum TransportErr {
|
|
|
|
UnknownMethod = -2,
|
|
|
|
}
|
|
|
|
|
|
|
|
#[inline(never)]
|
|
|
|
fn some_match(result: OpenResult) -> u8 {
|
|
|
|
match result {
|
|
|
|
OpenResult::Ok(()) => 0,
|
|
|
|
_ => 1,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let result = OpenResult::Ok(());
|
|
|
|
assert_eq!(some_match(result), 0);
|
|
|
|
}
|