test: Fix run-pass/enum-mach-type-compat on x86
This commit is contained in:
parent
60ec812b3a
commit
e21161b336
1 changed files with 12 additions and 0 deletions
|
|
@ -11,12 +11,24 @@ enum result<T, U> {
|
|||
|
||||
type error = int;
|
||||
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
fn get_fd() -> result<int, error> {
|
||||
getsockopt_i64()
|
||||
}
|
||||
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
fn getsockopt_i64() -> result<i64, error> {
|
||||
fail
|
||||
}
|
||||
|
||||
#[cfg(target_arch = "x86")]
|
||||
fn get_fd() -> result<int, error> {
|
||||
getsockopt_i32()
|
||||
}
|
||||
|
||||
#[cfg(target_arch = "x86")]
|
||||
fn getsockopt_i32() -> result<i32, error> {
|
||||
fail
|
||||
}
|
||||
|
||||
fn main() { }
|
||||
Loading…
Add table
Add a link
Reference in a new issue