diff --git a/src/bindgen/ir/opaque.rs b/src/bindgen/ir/opaque.rs index 48709921d5c680a9a13f40adf6f1b0e0e9c7310a..bf391ad785ceac4fda95eded6836c729c58cbe3d 100644 --- a/src/bindgen/ir/opaque.rs +++ b/src/bindgen/ir/opaque.rs @@ -103,8 +103,6 @@ impl Source for OpaqueItem { self.documentation.write(config, out); if config.language == Language::C { - write!(out, "struct {};", self.name); - out.new_line(); write!(out, "typedef struct {} {};", self.name, self.name); } else { write!(out, "struct {};", self.name); diff --git a/tests/expectations/enum.c b/tests/expectations/enum.c index 109972ae67dbacd4609b02e49206618c4e328b7b..6840677278a3b8fa32631287b5580018a61bcd3a 100644 --- a/tests/expectations/enum.c +++ b/tests/expectations/enum.c @@ -42,7 +42,6 @@ enum E { }; typedef intptr_t E; -struct Opaque; typedef struct Opaque Opaque; void root(Opaque *o, A a, B b, C c, D d, E e); diff --git a/tests/expectations/monomorph-1.c b/tests/expectations/monomorph-1.c index d269ba2e053a24b4a5efb5deb3b9ba51d93a9d1a..4d3cef61a462187a4435d3b768adaaec4015c5d4 100644 --- a/tests/expectations/monomorph-1.c +++ b/tests/expectations/monomorph-1.c @@ -2,13 +2,10 @@ #include <stdlib.h> #include <stdbool.h> -struct Bar_Bar_f32; typedef struct Bar_Bar_f32 Bar_Bar_f32; -struct Bar_Foo_f32; typedef struct Bar_Foo_f32 Bar_Foo_f32; -struct Bar_f32; typedef struct Bar_f32 Bar_f32; typedef struct { diff --git a/tests/expectations/monomorph-2.c b/tests/expectations/monomorph-2.c index fa44ab2a00e24743194c8a291fff19980d298718..a30558f76768b7dddad1a670b1b94c821e14cc2a 100644 --- a/tests/expectations/monomorph-2.c +++ b/tests/expectations/monomorph-2.c @@ -2,10 +2,8 @@ #include <stdlib.h> #include <stdbool.h> -struct A; typedef struct A A; -struct B; typedef struct B B; typedef struct { diff --git a/tests/expectations/monomorph-3.c b/tests/expectations/monomorph-3.c index 2c5bb4b57f761e6e528759225de55fcbb0653a9c..04a9ab3b68b3c09f7c58cadb6f35ea6779618b21 100644 --- a/tests/expectations/monomorph-3.c +++ b/tests/expectations/monomorph-3.c @@ -2,13 +2,10 @@ #include <stdlib.h> #include <stdbool.h> -struct Bar_Bar_f32; typedef struct Bar_Bar_f32 Bar_Bar_f32; -struct Bar_Foo_f32; typedef struct Bar_Foo_f32 Bar_Foo_f32; -struct Bar_f32; typedef struct Bar_f32 Bar_f32; typedef union { diff --git a/tests/expectations/simplify-option-ptr.c b/tests/expectations/simplify-option-ptr.c index 404c25e2b9b04b6345557187bc9d2793112c2cdf..20d02a697a9c18561a0450fe3c7840a3dac53c68 100644 --- a/tests/expectations/simplify-option-ptr.c +++ b/tests/expectations/simplify-option-ptr.c @@ -2,7 +2,6 @@ #include <stdlib.h> #include <stdbool.h> -struct Opaque; typedef struct Opaque Opaque; typedef struct { diff --git a/tests/expectations/static.c b/tests/expectations/static.c index 2266aa28e5d6d4911c972153f3634746a6241bea..bb9ddd2b4a0c2c38c150a8740deb49c3949c94dd 100644 --- a/tests/expectations/static.c +++ b/tests/expectations/static.c @@ -2,7 +2,6 @@ #include <stdlib.h> #include <stdbool.h> -struct Bar; typedef struct Bar Bar; typedef struct { diff --git a/tests/expectations/std_lib.c b/tests/expectations/std_lib.c index 8def5ba11051928c115efbe10f4743e0cf6b62da..09fe57ce1307c97ca28655bece1bf9e658f7ee84 100644 --- a/tests/expectations/std_lib.c +++ b/tests/expectations/std_lib.c @@ -2,13 +2,10 @@ #include <stdlib.h> #include <stdbool.h> -struct Option_i32; typedef struct Option_i32 Option_i32; -struct Result_i32__String; typedef struct Result_i32__String Result_i32__String; -struct Vec_String; typedef struct Vec_String Vec_String; void root(const Vec_String *a, const Option_i32 *b, const Result_i32__String *c); diff --git a/tests/expectations/struct.c b/tests/expectations/struct.c index 677a9ace25be6ab5ebc5ba1fd73966bcc792ef9a..f4f33b42364250796e8dd807df49961dc021a151 100644 --- a/tests/expectations/struct.c +++ b/tests/expectations/struct.c @@ -2,7 +2,6 @@ #include <stdlib.h> #include <stdbool.h> -struct Opaque; typedef struct Opaque Opaque; typedef struct { diff --git a/tests/expectations/union.c b/tests/expectations/union.c index 07e1035c98aea751de4c964d488c56d4bd2179e0..9ef889809d159034888bc0a38756e05737852da0 100644 --- a/tests/expectations/union.c +++ b/tests/expectations/union.c @@ -2,7 +2,6 @@ #include <stdlib.h> #include <stdbool.h> -struct Opaque; typedef struct Opaque Opaque; typedef union {