@@ -1098,8 +1098,6 @@ fn test_solarish(target: &str) {
10981098
10991099 cfg. field_name ( move |struct_, field| {
11001100 match struct_ {
1101- // rust struct uses raw u64, rather than union
1102- "epoll_event" if field == "u64" => "data.u64" . to_string ( ) ,
11031101 // rust struct was committed with typo for Solaris
11041102 "door_arg_t" if field == "dec_num" => "desc_num" . to_string ( ) ,
11051103 "stat" if field. ends_with ( "_nsec" ) => {
@@ -1372,7 +1370,6 @@ fn test_netbsd(target: &str) {
13721370 s if s. ends_with ( "_nsec" ) && struct_. starts_with ( "stat" ) => {
13731371 s. replace ( "e_nsec" , ".tv_nsec" )
13741372 }
1375- "u64" if struct_ == "epoll_event" => "data.u64" . to_string ( ) ,
13761373 s => s. to_string ( ) ,
13771374 }
13781375 } ) ;
@@ -1583,7 +1580,6 @@ fn test_dragonflybsd(target: &str) {
15831580 s if s. ends_with ( "_nsec" ) && struct_. starts_with ( "stat" ) => {
15841581 s. replace ( "e_nsec" , ".tv_nsec" )
15851582 }
1586- "u64" if struct_ == "epoll_event" => "data.u64" . to_string ( ) ,
15871583 // Field is named `type` in C but that is a Rust keyword,
15881584 // so these fields are translated to `type_` in the bindings.
15891585 "type_" if struct_ == "rtprio" => "type" . to_string ( ) ,
@@ -1965,8 +1961,6 @@ fn test_android(target: &str) {
19651961 // Our stat *_nsec fields normally don't actually exist but are part
19661962 // of a timeval struct
19671963 s if s. ends_with ( "_nsec" ) && struct_. starts_with ( "stat" ) => s. to_string ( ) ,
1968- // FIXME(union): appears that `epoll_event.data` is an union
1969- "u64" if struct_ == "epoll_event" => "data.u64" . to_string ( ) ,
19701964 // The following structs have a field called `type` in C,
19711965 // but `type` is a Rust keyword, so these fields are translated
19721966 // to `type_` in Rust.
@@ -3064,8 +3058,6 @@ fn test_emscripten(target: &str) {
30643058 s if s. ends_with ( "_nsec" ) && struct_. starts_with ( "stat" ) => {
30653059 s. replace ( "e_nsec" , ".tv_nsec" )
30663060 }
3067- // Rust struct uses raw u64, rather than union
3068- "u64" if struct_ == "epoll_event" => "data.u64" . to_string ( ) ,
30693061 s => s. to_string ( ) ,
30703062 }
30713063 } ) ;
@@ -3875,10 +3867,6 @@ fn test_linux(target: &str) {
38753867 s if s. ends_with ( "_nsec" ) && struct_. starts_with ( "stat" ) => {
38763868 s. replace ( "e_nsec" , ".tv_nsec" )
38773869 }
3878- // FIXME(linux): epoll_event.data is actually a union in C, but in Rust
3879- // it is only a u64 because we only expose one field
3880- // http://man7.org/linux/man-pages/man2/epoll_wait.2.html
3881- "u64" if struct_ == "epoll_event" => "data.u64" . to_string ( ) ,
38823870 // The following structs have a field called `type` in C,
38833871 // but `type` is a Rust keyword, so these fields are translated
38843872 // to `type_` in Rust.
0 commit comments