@@ -1101,8 +1101,6 @@ fn test_solarish(target: &str) {
11011101
11021102 cfg. field_name ( move |struct_, field| {
11031103 match struct_ {
1104- // rust struct uses raw u64, rather than union
1105- "epoll_event" if field == "u64" => "data.u64" . to_string ( ) ,
11061104 // rust struct was committed with typo for Solaris
11071105 "door_arg_t" if field == "dec_num" => "desc_num" . to_string ( ) ,
11081106 "stat" if field. ends_with ( "_nsec" ) => {
@@ -1375,7 +1373,6 @@ fn test_netbsd(target: &str) {
13751373 s if s. ends_with ( "_nsec" ) && struct_. starts_with ( "stat" ) => {
13761374 s. replace ( "e_nsec" , ".tv_nsec" )
13771375 }
1378- "u64" if struct_ == "epoll_event" => "data.u64" . to_string ( ) ,
13791376 s => s. to_string ( ) ,
13801377 }
13811378 } ) ;
@@ -1586,7 +1583,6 @@ fn test_dragonflybsd(target: &str) {
15861583 s if s. ends_with ( "_nsec" ) && struct_. starts_with ( "stat" ) => {
15871584 s. replace ( "e_nsec" , ".tv_nsec" )
15881585 }
1589- "u64" if struct_ == "epoll_event" => "data.u64" . to_string ( ) ,
15901586 // Field is named `type` in C but that is a Rust keyword,
15911587 // so these fields are translated to `type_` in the bindings.
15921588 "type_" if struct_ == "rtprio" => "type" . to_string ( ) ,
@@ -1968,8 +1964,6 @@ fn test_android(target: &str) {
19681964 // Our stat *_nsec fields normally don't actually exist but are part
19691965 // of a timeval struct
19701966 s if s. ends_with ( "_nsec" ) && struct_. starts_with ( "stat" ) => s. to_string ( ) ,
1971- // FIXME(union): appears that `epoll_event.data` is an union
1972- "u64" if struct_ == "epoll_event" => "data.u64" . to_string ( ) ,
19731967 // The following structs have a field called `type` in C,
19741968 // but `type` is a Rust keyword, so these fields are translated
19751969 // to `type_` in Rust.
@@ -3066,8 +3060,6 @@ fn test_emscripten(target: &str) {
30663060 s if s. ends_with ( "_nsec" ) && struct_. starts_with ( "stat" ) => {
30673061 s. replace ( "e_nsec" , ".tv_nsec" )
30683062 }
3069- // Rust struct uses raw u64, rather than union
3070- "u64" if struct_ == "epoll_event" => "data.u64" . to_string ( ) ,
30713063 s => s. to_string ( ) ,
30723064 }
30733065 } ) ;
@@ -3872,10 +3864,6 @@ fn test_linux(target: &str) {
38723864 s if s. ends_with ( "_nsec" ) && struct_. starts_with ( "stat" ) => {
38733865 s. replace ( "e_nsec" , ".tv_nsec" )
38743866 }
3875- // FIXME(linux): epoll_event.data is actually a union in C, but in Rust
3876- // it is only a u64 because we only expose one field
3877- // http://man7.org/linux/man-pages/man2/epoll_wait.2.html
3878- "u64" if struct_ == "epoll_event" => "data.u64" . to_string ( ) ,
38793867 // The following structs have a field called `type` in C,
38803868 // but `type` is a Rust keyword, so these fields are translated
38813869 // to `type_` in Rust.
0 commit comments