diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2018-01-19 13:06:48 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-19 13:06:48 -0600 |
commit | 8fa15cc9b93bffdb93ac05c374eca25157bcf281 (patch) | |
tree | 3ed6980d2308c000f42f4c0e670738bf9ee66219 | |
parent | d3d69c6d33bd22b7edee560d59dab8946911cc0e (diff) | |
parent | fbb6d6f6240895d224ee3b475f8739b414fbc564 (diff) |
Auto merge of #1228 - emilio:repr-c-enums, r=fitzgen
codegen: Don't generate repr(C) for enums.
That's only undefined for enums with fields.
Fixes #1224
See also: https://botbot.me/mozilla/rustc/2018-01-19/?msg=95934948&page=2
45 files changed, 1 insertions, 172 deletions
diff --git a/src/codegen/mod.rs b/src/codegen/mod.rs index 16ff79fb..5641b84d 100644 --- a/src/codegen/mod.rs +++ b/src/codegen/mod.rs @@ -2442,9 +2442,7 @@ impl CodeGenerator for Enum { // TODO(emilio): Delegate this to the builders? if variation.is_rust() { attrs.push(attributes::repr(repr_name)); - } - - if variation.is_bitfield() || variation.is_rust() { + } else if variation.is_bitfield() { attrs.push(attributes::repr("C")); } diff --git a/tests/expectations/tests/anon_enum.rs b/tests/expectations/tests/anon_enum.rs index c482530c..76d6089f 100644 --- a/tests/expectations/tests/anon_enum.rs +++ b/tests/expectations/tests/anon_enum.rs @@ -1,9 +1,7 @@ /* automatically generated by rust-bindgen */ - #![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - #[repr(C)] #[derive(Debug, Default, Copy, Clone, PartialEq)] pub struct Test { @@ -12,7 +10,6 @@ pub struct Test { } pub const Test_T_NONE: Test__bindgen_ty_1 = Test__bindgen_ty_1::T_NONE; #[repr(u32)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum Test__bindgen_ty_1 { T_NONE = 0, @@ -41,7 +38,6 @@ fn bindgen_test_layout_Test() { ); } #[repr(u32)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum Baz { Foo = 0, diff --git a/tests/expectations/tests/anon_enum_trait.rs b/tests/expectations/tests/anon_enum_trait.rs index 21d22879..6eb9f440 100644 --- a/tests/expectations/tests/anon_enum_trait.rs +++ b/tests/expectations/tests/anon_enum_trait.rs @@ -1,9 +1,7 @@ /* automatically generated by rust-bindgen */ - #![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)] pub struct DataType { @@ -19,7 +17,6 @@ pub const DataType_channels: DataType__bindgen_ty_1 = DataType__bindgen_ty_1::ge pub const DataType_fmt: DataType__bindgen_ty_1 = DataType__bindgen_ty_1::generic_type; pub const DataType_type_: DataType__bindgen_ty_1 = DataType__bindgen_ty_1::generic_type; #[repr(i32)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum DataType__bindgen_ty_1 { generic_type = 0, @@ -32,7 +29,6 @@ pub struct Foo { pub const Foo_Bar: Foo__bindgen_ty_1 = Foo__bindgen_ty_1::Bar; pub const Foo_Baz: Foo__bindgen_ty_1 = Foo__bindgen_ty_1::Bar; #[repr(u32)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum Foo__bindgen_ty_1 { Bar = 0, diff --git a/tests/expectations/tests/anon_enum_whitelist.rs b/tests/expectations/tests/anon_enum_whitelist.rs index 45b858fd..267d9229 100644 --- a/tests/expectations/tests/anon_enum_whitelist.rs +++ b/tests/expectations/tests/anon_enum_whitelist.rs @@ -1,13 +1,10 @@ /* automatically generated by rust-bindgen */ - #![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - pub const NODE_FLAG_FOO: _bindgen_ty_1 = _bindgen_ty_1::NODE_FLAG_FOO; pub const NODE_FLAG_BAR: _bindgen_ty_1 = _bindgen_ty_1::NODE_FLAG_BAR; #[repr(u32)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum _bindgen_ty_1 { NODE_FLAG_FOO = 0, diff --git a/tests/expectations/tests/anon_union.rs b/tests/expectations/tests/anon_union.rs index da990ae9..68927914 100644 --- a/tests/expectations/tests/anon_union.rs +++ b/tests/expectations/tests/anon_union.rs @@ -1,9 +1,7 @@ /* automatically generated by rust-bindgen */ - #![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - #[repr(C)] pub struct TErrorResult { pub mResult: ::std::os::raw::c_int, @@ -14,7 +12,6 @@ pub struct TErrorResult { pub const TErrorResult_UnionState_HasException: TErrorResult_UnionState = TErrorResult_UnionState::HasMessage; #[repr(i32)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum TErrorResult_UnionState { HasMessage = 0, diff --git a/tests/expectations/tests/anon_union_1_0.rs b/tests/expectations/tests/anon_union_1_0.rs index 67a332c0..80111b90 100644 --- a/tests/expectations/tests/anon_union_1_0.rs +++ b/tests/expectations/tests/anon_union_1_0.rs @@ -1,9 +1,7 @@ /* automatically generated by rust-bindgen */ - #![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - #[repr(C)] pub struct __BindgenUnionField<T>(::std::marker::PhantomData<T>); impl<T> __BindgenUnionField<T> { @@ -58,7 +56,6 @@ pub struct TErrorResult { pub const TErrorResult_UnionState_HasException: TErrorResult_UnionState = TErrorResult_UnionState::HasMessage; #[repr(i32)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum TErrorResult_UnionState { HasMessage = 0, diff --git a/tests/expectations/tests/bitfield_align_2.rs b/tests/expectations/tests/bitfield_align_2.rs index 5174d1aa..5d63699d 100644 --- a/tests/expectations/tests/bitfield_align_2.rs +++ b/tests/expectations/tests/bitfield_align_2.rs @@ -1,9 +1,7 @@ /* automatically generated by rust-bindgen */ - #![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - #[repr(C)] #[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] pub struct __BindgenBitfieldUnit<Storage, Align> @@ -84,7 +82,6 @@ where } } #[repr(u32)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum MyEnum { ONE = 0, diff --git a/tests/expectations/tests/class_with_inner_struct.rs b/tests/expectations/tests/class_with_inner_struct.rs index f6560125..265d7c5b 100644 --- a/tests/expectations/tests/class_with_inner_struct.rs +++ b/tests/expectations/tests/class_with_inner_struct.rs @@ -1,9 +1,7 @@ /* automatically generated by rust-bindgen */ - #![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - #[repr(C)] #[derive(Copy, Clone)] pub struct A { @@ -214,7 +212,6 @@ fn bindgen_test_layout_B() { ); } #[repr(i32)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum StepSyntax { Keyword = 0, diff --git a/tests/expectations/tests/class_with_inner_struct_1_0.rs b/tests/expectations/tests/class_with_inner_struct_1_0.rs index e8072362..a2c01b4e 100644 --- a/tests/expectations/tests/class_with_inner_struct_1_0.rs +++ b/tests/expectations/tests/class_with_inner_struct_1_0.rs @@ -1,9 +1,7 @@ /* automatically generated by rust-bindgen */ - #![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - #[repr(C)] pub struct __BindgenUnionField<T>(::std::marker::PhantomData<T>); impl<T> __BindgenUnionField<T> { @@ -272,7 +270,6 @@ impl Clone for B { } } #[repr(i32)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum StepSyntax { Keyword = 0, diff --git a/tests/expectations/tests/const_enum_unnamed.rs b/tests/expectations/tests/const_enum_unnamed.rs index 833f8351..6b04c7dd 100644 --- a/tests/expectations/tests/const_enum_unnamed.rs +++ b/tests/expectations/tests/const_enum_unnamed.rs @@ -1,13 +1,10 @@ /* automatically generated by rust-bindgen */ - #![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - pub const FOO_BAR: _bindgen_ty_1 = _bindgen_ty_1::FOO_BAR; pub const FOO_BAZ: _bindgen_ty_1 = _bindgen_ty_1::FOO_BAZ; #[repr(u32)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum _bindgen_ty_1 { FOO_BAR = 0, @@ -20,7 +17,6 @@ pub struct Foo { } pub const Foo_FOO_BAR: Foo__bindgen_ty_1 = Foo__bindgen_ty_1::FOO_BAR; #[repr(u32)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum Foo__bindgen_ty_1 { FOO_BAR = 10, diff --git a/tests/expectations/tests/constify-enum.rs b/tests/expectations/tests/constify-enum.rs index 79fc4dff..dd46e085 100644 --- a/tests/expectations/tests/constify-enum.rs +++ b/tests/expectations/tests/constify-enum.rs @@ -1,15 +1,12 @@ /* automatically generated by rust-bindgen */ - #![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - pub const nsCSSPropertyID_eCSSProperty_COUNT_unexistingVariantValue: nsCSSPropertyID = nsCSSPropertyID::eCSSProperty_COUNT_unexistingVariantValue; pub const nsCSSPropertyID_eCSSProperty_COUNT: nsCSSPropertyID = nsCSSPropertyID::eCSSPropertyAlias_aa; #[repr(u32)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum nsCSSPropertyID { eCSSProperty_a = 0, diff --git a/tests/expectations/tests/empty-enum.rs b/tests/expectations/tests/empty-enum.rs index 4ec7df8a..99ffc27e 100644 --- a/tests/expectations/tests/empty-enum.rs +++ b/tests/expectations/tests/empty-enum.rs @@ -1,12 +1,9 @@ /* automatically generated by rust-bindgen */ - #![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - pub type EmptyConstified = ::std::os::raw::c_uint; #[repr(u32)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum EmptyRustified { __bindgen_cannot_repr_c_on_empty_enum = 0, @@ -15,7 +12,6 @@ pub mod EmptyModule { pub type Type = ::std::os::raw::c_uint; } #[repr(i8)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum EmptyClassRustified { __bindgen_cannot_repr_c_on_empty_enum = 0, @@ -25,7 +21,6 @@ pub mod EmptyClassModule { pub type Type = ::std::os::raw::c_char; } #[repr(i8)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum ForwardClassRustified { __bindgen_cannot_repr_c_on_empty_enum = 0, diff --git a/tests/expectations/tests/enum.rs b/tests/expectations/tests/enum.rs index b1920aae..2ed5d187 100644 --- a/tests/expectations/tests/enum.rs +++ b/tests/expectations/tests/enum.rs @@ -1,18 +1,14 @@ /* automatically generated by rust-bindgen */ - #![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - #[repr(u32)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum Foo { Bar = 0, Qux = 1, } #[repr(i32)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum Neg { MinusOne = -1, diff --git a/tests/expectations/tests/enum_alias.rs b/tests/expectations/tests/enum_alias.rs index cde429f7..30a4f62a 100644 --- a/tests/expectations/tests/enum_alias.rs +++ b/tests/expectations/tests/enum_alias.rs @@ -1,11 +1,8 @@ /* automatically generated by rust-bindgen */ - #![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - #[repr(u8)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum Bar { VAL = 0, diff --git a/tests/expectations/tests/enum_and_vtable_mangling.rs b/tests/expectations/tests/enum_and_vtable_mangling.rs index 42ee3832..76e28aaf 100644 --- a/tests/expectations/tests/enum_and_vtable_mangling.rs +++ b/tests/expectations/tests/enum_and_vtable_mangling.rs @@ -1,13 +1,10 @@ /* automatically generated by rust-bindgen */ - #![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - pub const match_: _bindgen_ty_1 = _bindgen_ty_1::match_; pub const whatever_else: _bindgen_ty_1 = _bindgen_ty_1::whatever_else; #[repr(u32)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum _bindgen_ty_1 { match_ = 0, diff --git a/tests/expectations/tests/enum_dupe.rs b/tests/expectations/tests/enum_dupe.rs index 151b2cd0..29bd7502 100644 --- a/tests/expectations/tests/enum_dupe.rs +++ b/tests/expectations/tests/enum_dupe.rs @@ -1,12 +1,9 @@ /* automatically generated by rust-bindgen */ - #![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - pub const Foo_Dupe: Foo = Foo::Bar; #[repr(u32)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum Foo { Bar = 1, diff --git a/tests/expectations/tests/enum_explicit_type.rs b/tests/expectations/tests/enum_explicit_type.rs index 644a1cea..17f135b3 100644 --- a/tests/expectations/tests/enum_explicit_type.rs +++ b/tests/expectations/tests/enum_explicit_type.rs @@ -1,44 +1,36 @@ /* automatically generated by rust-bindgen */ - #![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - #[repr(u8)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum Foo { Bar = 0, Qux = 1, } #[repr(i8)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum Neg { MinusOne = -1, One = 1, } #[repr(u16)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum Bigger { Much = 255, Larger = 256, } #[repr(i64)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum MuchLong { MuchLow = -4294967296, } #[repr(i64)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum MuchLongLong { I64_MIN = -9223372036854775808, } #[repr(u64)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum MuchULongLong { MuchHigh = 4294967296, diff --git a/tests/expectations/tests/enum_in_template_with_typedef.rs b/tests/expectations/tests/enum_in_template_with_typedef.rs index 588bb42b..a3b4e776 100644 --- a/tests/expectations/tests/enum_in_template_with_typedef.rs +++ b/tests/expectations/tests/enum_in_template_with_typedef.rs @@ -1,9 +1,7 @@ /* automatically generated by rust-bindgen */ - #![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct std_fbstring_core { @@ -13,7 +11,6 @@ pub type std_fbstring_core_category_type = u8; pub const std_fbstring_core_Category_Bar: std_fbstring_core_Category = std_fbstring_core_Category::Foo; #[repr(u8)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum std_fbstring_core_Category { Foo = 0, diff --git a/tests/expectations/tests/enum_negative.rs b/tests/expectations/tests/enum_negative.rs index 1fe2f6a4..e066968d 100644 --- a/tests/expectations/tests/enum_negative.rs +++ b/tests/expectations/tests/enum_negative.rs @@ -1,11 +1,8 @@ /* automatically generated by rust-bindgen */ - #![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - #[repr(i32)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum Foo { Bar = -2, diff --git a/tests/expectations/tests/enum_packed.rs b/tests/expectations/tests/enum_packed.rs index d8e96b0f..d388b5ed 100644 --- a/tests/expectations/tests/enum_packed.rs +++ b/tests/expectations/tests/enum_packed.rs @@ -1,25 +1,20 @@ /* automatically generated by rust-bindgen */ - #![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - #[repr(u8)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum Foo { Bar = 0, Qux = 1, } #[repr(i8)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum Neg { MinusOne = -1, One = 1, } #[repr(u16)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum Bigger { Much = 255, diff --git a/tests/expectations/tests/forward-enum-decl.rs b/tests/expectations/tests/forward-enum-decl.rs index c2dea97a..d327cb72 100644 --- a/tests/expectations/tests/forward-enum-decl.rs +++ b/tests/expectations/tests/forward-enum-decl.rs @@ -1,11 +1,8 @@ /* automatically generated by rust-bindgen */ - #![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - #[repr(i32)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum CSSPseudoClassType { empty = 0, diff --git a/tests/expectations/tests/func_ptr_in_struct.rs b/tests/expectations/tests/func_ptr_in_struct.rs index 33d908e2..d66ce84d 100644 --- a/tests/expectations/tests/func_ptr_in_struct.rs +++ b/tests/expectations/tests/func_ptr_in_struct.rs @@ -1,11 +1,8 @@ /* automatically generated by rust-bindgen */ - #![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - #[repr(i32)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum baz { __bindgen_cannot_repr_c_on_empty_enum = 0, diff --git a/tests/expectations/tests/issue-372.rs b/tests/expectations/tests/issue-372.rs index f9040a99..a146573b 100644 --- a/tests/expectations/tests/issue-372.rs +++ b/tests/expectations/tests/issue-372.rs @@ -1,9 +1,7 @@ /* automatically generated by rust-bindgen */ - #![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - #[allow(non_snake_case, non_camel_case_types, non_upper_case_globals)] pub mod root { #[allow(unused_imports)] @@ -77,7 +75,6 @@ pub mod root { } } #[repr(u32)] - #[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum n { o = 0, diff --git a/tests/expectations/tests/issue-410.rs b/tests/expectations/tests/issue-410.rs index f23462bf..e1ce9df5 100644 --- a/tests/expectations/tests/issue-410.rs +++ b/tests/expectations/tests/issue-410.rs @@ -1,9 +1,7 @@ /* automatically generated by rust-bindgen */ - #![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - #[allow(non_snake_case, non_camel_case_types, non_upper_case_globals)] pub mod root { #[allow(unused_imports)] @@ -41,7 +39,6 @@ pub mod root { } } #[repr(u32)] - #[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum JSWhyMagic { __bindgen_cannot_repr_c_on_empty_enum = 0, diff --git a/tests/expectations/tests/issue-493.rs b/tests/expectations/tests/issue-493.rs index d338e30c..69003faf 100644 --- a/tests/expectations/tests/issue-493.rs +++ b/tests/expectations/tests/issue-493.rs @@ -1,9 +1,7 @@ /* automatically generated by rust-bindgen */ - #![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - #[repr(C)] pub struct __BindgenUnionField<T>(::std::marker::PhantomData<T>); impl<T> __BindgenUnionField<T> { @@ -70,7 +68,6 @@ impl Default for basic_string___long { pub const basic_string___min_cap: basic_string__bindgen_ty_1 = basic_string__bindgen_ty_1::__min_cap; #[repr(i32)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum basic_string__bindgen_ty_1 { __min_cap = 0, @@ -110,7 +107,6 @@ impl Default for basic_string___ulx { pub const basic_string___n_words: basic_string__bindgen_ty_2 = basic_string__bindgen_ty_2::__n_words; #[repr(i32)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum basic_string__bindgen_ty_2 { __n_words = 0, diff --git a/tests/expectations/tests/issue-493_1_0.rs b/tests/expectations/tests/issue-493_1_0.rs index 4dfc26d8..a65cd3e8 100644 --- a/tests/expectations/tests/issue-493_1_0.rs +++ b/tests/expectations/tests/issue-493_1_0.rs @@ -1,9 +1,7 @@ /* automatically generated by rust-bindgen */ - #![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - #[repr(C)] pub struct __BindgenUnionField<T>(::std::marker::PhantomData<T>); impl<T> __BindgenUnionField<T> { @@ -70,7 +68,6 @@ impl Default for basic_string___long { pub const basic_string___min_cap: basic_string__bindgen_ty_1 = basic_string__bindgen_ty_1::__min_cap; #[repr(i32)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum basic_string__bindgen_ty_1 { __min_cap = 0, @@ -108,7 +105,6 @@ impl Default for basic_string___ulx { pub const basic_string___n_words: basic_string__bindgen_ty_2 = basic_string__bindgen_ty_2::__n_words; #[repr(i32)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum basic_string__bindgen_ty_2 { __n_words = 0, diff --git a/tests/expectations/tests/issue-569-non-type-template-params-causing-layout-test-failures.rs b/tests/expectations/tests/issue-569-non-type-template-params-causing-layout-test-failures.rs index 3029a670..1119b7e7 100644 --- a/tests/expectations/tests/issue-569-non-type-template-params-causing-layout-test-failures.rs +++ b/tests/expectations/tests/issue-569-non-type-template-params-causing-layout-test-failures.rs @@ -1,13 +1,10 @@ /* automatically generated by rust-bindgen */ - #![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - pub const ENUM_VARIANT_1: _bindgen_ty_1 = _bindgen_ty_1::ENUM_VARIANT_1; pub const ENUM_VARIANT_2: _bindgen_ty_1 = _bindgen_ty_1::ENUM_VARIANT_2; #[repr(u32)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum _bindgen_ty_1 { ENUM_VARIANT_1 = 0, diff --git a/tests/expectations/tests/issue-888-enum-var-decl-jump.rs b/tests/expectations/tests/issue-888-enum-var-decl-jump.rs index c0ac112d..df48ae24 100644 --- a/tests/expectations/tests/issue-888-enum-var-decl-jump.rs +++ b/tests/expectations/tests/issue-888-enum-var-decl-jump.rs @@ -1,9 +1,7 @@ /* automatically generated by rust-bindgen */ - #![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - #[allow(non_snake_case, non_camel_case_types, non_upper_case_globals)] pub mod root { #[allow(unused_imports)] @@ -35,7 +33,6 @@ pub mod root { } } #[repr(u32)] - #[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum a { __bindgen_cannot_repr_c_on_empty_enum = 0, diff --git a/tests/expectations/tests/jsval_layout_opaque.rs b/tests/expectations/tests/jsval_layout_opaque.rs index 2b2d0d77..fa4999ca 100644 --- a/tests/expectations/tests/jsval_layout_opaque.rs +++ b/tests/expectations/tests/jsval_layout_opaque.rs @@ -1,9 +1,7 @@ /* automatically generated by rust-bindgen */ - #![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - #[repr(C)] #[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] pub struct __BindgenBitfieldUnit<Storage, Align> @@ -87,7 +85,6 @@ pub const JSVAL_TAG_SHIFT: ::std::os::raw::c_uint = 47; pub const JSVAL_PAYLOAD_MASK: ::std::os::raw::c_ulonglong = 140737488355327; pub const JSVAL_TAG_MASK: ::std::os::raw::c_longlong = -140737488355328; #[repr(u8)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum JSValueType { JSVAL_TYPE_DOUBLE = 0, @@ -103,7 +100,6 @@ pub enum JSValueType { JSVAL_TYPE_MISSING = 33, } #[repr(u32)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum JSValueTag { JSVAL_TAG_MAX_DOUBLE = 131056, @@ -117,7 +113,6 @@ pub enum JSValueTag { JSVAL_TAG_OBJECT = 131064, } #[repr(u64)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum JSValueShiftedTag { JSVAL_SHIFTED_TAG_MAX_DOUBLE = 18444492278190833663, @@ -131,7 +126,6 @@ pub enum JSValueShiftedTag { JSVAL_SHIFTED_TAG_OBJECT = 18445618173802708992, } #[repr(u32)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum JSWhyMagic { JS_ELEMENTS_HOLE = 0, diff --git a/tests/expectations/tests/jsval_layout_opaque_1_0.rs b/tests/expectations/tests/jsval_layout_opaque_1_0.rs index ab11a231..dc41c49c 100644 --- a/tests/expectations/tests/jsval_layout_opaque_1_0.rs +++ b/tests/expectations/tests/jsval_layout_opaque_1_0.rs @@ -1,9 +1,7 @@ /* automatically generated by rust-bindgen */ - #![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - #[repr(C)] #[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] pub struct __BindgenBitfieldUnit<Storage, Align> @@ -130,7 +128,6 @@ pub const JSVAL_TAG_SHIFT: ::std::os::raw::c_uint = 47; pub const JSVAL_PAYLOAD_MASK: ::std::os::raw::c_ulonglong = 140737488355327; pub const JSVAL_TAG_MASK: ::std::os::raw::c_longlong = -140737488355328; #[repr(u8)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum JSValueType { JSVAL_TYPE_DOUBLE = 0, @@ -146,7 +143,6 @@ pub enum JSValueType { JSVAL_TYPE_MISSING = 33, } #[repr(u32)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum JSValueTag { JSVAL_TAG_MAX_DOUBLE = 131056, @@ -160,7 +156,6 @@ pub enum JSValueTag { JSVAL_TAG_OBJECT = 131064, } #[repr(u64)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum JSValueShiftedTag { JSVAL_SHIFTED_TAG_MAX_DOUBLE = 18444492278190833663, @@ -174,7 +169,6 @@ pub enum JSValueShiftedTag { JSVAL_SHIFTED_TAG_OBJECT = 18445618173802708992, } #[repr(u32)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum JSWhyMagic { JS_ELEMENTS_HOLE = 0, diff --git a/tests/expectations/tests/layout_array_too_long.rs b/tests/expectations/tests/layout_array_too_long.rs index 59884451..bb98704f 100644 --- a/tests/expectations/tests/layout_array_too_long.rs +++ b/tests/expectations/tests/layout_array_too_long.rs @@ -1,9 +1,7 @@ /* automatically generated by rust-bindgen */ - #![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - pub const RTE_CACHE_LINE_SIZE: ::std::os::raw::c_uint = 64; pub const RTE_LIBRTE_IP_FRAG_MAX_FRAG: ::std::os::raw::c_uint = 4; pub const IP_LAST_FRAG_IDX: _bindgen_ty_1 = _bindgen_ty_1::IP_LAST_FRAG_IDX; @@ -11,7 +9,6 @@ pub const IP_FIRST_FRAG_IDX: _bindgen_ty_1 = _bindgen_ty_1::IP_FIRST_FRAG_IDX; pub const IP_MIN_FRAG_NUM: _bindgen_ty_1 = _bindgen_ty_1::IP_MIN_FRAG_NUM; pub const IP_MAX_FRAG_NUM: _bindgen_ty_1 = _bindgen_ty_1::IP_MAX_FRAG_NUM; #[repr(u32)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum _bindgen_ty_1 { IP_LAST_FRAG_IDX = 0, diff --git a/tests/expectations/tests/layout_cmdline_token.rs b/tests/expectations/tests/layout_cmdline_token.rs index 2cde7c42..d583e641 100644 --- a/tests/expectations/tests/layout_cmdline_token.rs +++ b/tests/expectations/tests/layout_cmdline_token.rs @@ -1,10 +1,7 @@ /* automatically generated by rust-bindgen */ - #![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - - /// Stores a pointer to the ops struct, and the offset: the place to /// write the parsed result in the destination structure. #[repr(C)] @@ -166,7 +163,6 @@ impl Default for cmdline_token_ops { } } #[repr(u32)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum cmdline_numtype { UINT8 = 0, diff --git a/tests/expectations/tests/layout_eth_conf.rs b/tests/expectations/tests/layout_eth_conf.rs index 599f9788..176e0d55 100644 --- a/tests/expectations/tests/layout_eth_conf.rs +++ b/tests/expectations/tests/layout_eth_conf.rs @@ -1,9 +1,7 @@ /* automatically generated by rust-bindgen */ - #![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - #[repr(C)] #[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] pub struct __BindgenBitfieldUnit<Storage, Align> @@ -116,7 +114,6 @@ pub const RTE_ETH_FLOW_GENEVE: ::std::os::raw::c_uint = 20; pub const RTE_ETH_FLOW_NVGRE: ::std::os::raw::c_uint = 21; pub const RTE_ETH_FLOW_MAX: ::std::os::raw::c_uint = 22; #[repr(u32)] -#[repr(C)] /// A set of values to identify what method is to be used to route /// packets to multiple queues. #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] @@ -344,7 +341,6 @@ impl rte_eth_rxmode { } } #[repr(u32)] -#[repr(C)] /// A set of values to identify what method is to be used to transmit /// packets using multi-TCs. #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] @@ -534,7 +530,6 @@ impl Default for rte_eth_rss_conf { } } #[repr(u32)] -#[repr(C)] /// This enum indicates the possible number of traffic classes /// in DCB configratioins #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] @@ -543,7 +538,6 @@ pub enum rte_eth_nb_tcs { ETH_8_TCS = 8, } #[repr(u32)] -#[repr(C)] /// This enum indicates the possible number of queue pools /// in VMDQ configurations. #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] @@ -1058,7 +1052,6 @@ impl Default for rte_eth_vmdq_rx_conf { } } #[repr(u32)] -#[repr(C)] /// Flow Director setting modes: none, signature or perfect. #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum rte_fdir_mode { @@ -1069,7 +1062,6 @@ pub enum rte_fdir_mode { RTE_FDIR_MODE_PERFECT_TUNNEL = 4, } #[repr(u32)] -#[repr(C)] /// Memory space that can be configured to store Flow Director filters /// in the board memory. #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] @@ -1079,7 +1071,6 @@ pub enum rte_fdir_pballoc_type { RTE_FDIR_PBALLOC_256K = 2, } #[repr(u32)] -#[repr(C)] /// Select report mode of FDIR hash information in RX descriptors. #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum rte_fdir_status_mode { @@ -1373,7 +1364,6 @@ fn bindgen_test_layout_rte_eth_fdir_masks() { ); } #[repr(u32)] -#[repr(C)] /// Payload type #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum rte_eth_payload_type { diff --git a/tests/expectations/tests/layout_eth_conf_1_0.rs b/tests/expectations/tests/layout_eth_conf_1_0.rs index 532fcae8..8323460a 100644 --- a/tests/expectations/tests/layout_eth_conf_1_0.rs +++ b/tests/expectations/tests/layout_eth_conf_1_0.rs @@ -1,9 +1,7 @@ /* automatically generated by rust-bindgen */ - #![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - #[repr(C)] #[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] pub struct __BindgenBitfieldUnit<Storage, Align> @@ -159,7 +157,6 @@ pub const RTE_ETH_FLOW_GENEVE: ::std::os::raw::c_uint = 20; pub const RTE_ETH_FLOW_NVGRE: ::std::os::raw::c_uint = 21; pub const RTE_ETH_FLOW_MAX: ::std::os::raw::c_uint = 22; #[repr(u32)] -#[repr(C)] /// A set of values to identify what method is to be used to route /// packets to multiple queues. #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] @@ -392,7 +389,6 @@ impl rte_eth_rxmode { } } #[repr(u32)] -#[repr(C)] /// A set of values to identify what method is to be used to transmit /// packets using multi-TCs. #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] @@ -592,7 +588,6 @@ impl Default for rte_eth_rss_conf { } } #[repr(u32)] -#[repr(C)] /// This enum indicates the possible number of traffic classes /// in DCB configratioins #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] @@ -601,7 +596,6 @@ pub enum rte_eth_nb_tcs { ETH_8_TCS = 8, } #[repr(u32)] -#[repr(C)] /// This enum indicates the possible number of queue pools /// in VMDQ configurations. #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] @@ -1156,7 +1150,6 @@ impl Default for rte_eth_vmdq_rx_conf { } } #[repr(u32)] -#[repr(C)] /// Flow Director setting modes: none, signature or perfect. #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum rte_fdir_mode { @@ -1167,7 +1160,6 @@ pub enum rte_fdir_mode { RTE_FDIR_MODE_PERFECT_TUNNEL = 4, } #[repr(u32)] -#[repr(C)] /// Memory space that can be configured to store Flow Director filters /// in the board memory. #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] @@ -1177,7 +1169,6 @@ pub enum rte_fdir_pballoc_type { RTE_FDIR_PBALLOC_256K = 2, } #[repr(u32)] -#[repr(C)] /// Select report mode of FDIR hash information in RX descriptors. #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum rte_fdir_status_mode { @@ -1486,7 +1477,6 @@ impl Clone for rte_eth_fdir_masks { } } #[repr(u32)] -#[repr(C)] /// Payload type #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum rte_eth_payload_type { diff --git a/tests/expectations/tests/layout_large_align_field.rs b/tests/expectations/tests/layout_large_align_field.rs index 501e1bce..cbe84e3b 100644 --- a/tests/expectations/tests/layout_large_align_field.rs +++ b/tests/expectations/tests/layout_large_align_field.rs @@ -1,9 +1,7 @@ /* automatically generated by rust-bindgen */ - #![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - #[repr(C)] #[derive(Default)] pub struct __IncompleteArrayField<T>(::std::marker::PhantomData<T>); @@ -48,7 +46,6 @@ pub const IP_FIRST_FRAG_IDX: _bindgen_ty_1 = _bindgen_ty_1::IP_FIRST_FRAG_IDX; pub const IP_MIN_FRAG_NUM: _bindgen_ty_1 = _bindgen_ty_1::IP_MIN_FRAG_NUM; pub const IP_MAX_FRAG_NUM: _bindgen_ty_1 = _bindgen_ty_1::IP_MAX_FRAG_NUM; #[repr(u32)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum _bindgen_ty_1 { IP_LAST_FRAG_IDX = 0, diff --git a/tests/expectations/tests/libclang-3.8/constant-evaluate.rs b/tests/expectations/tests/libclang-3.8/constant-evaluate.rs index 1b6aca15..8faddfe9 100644 --- a/tests/expectations/tests/libclang-3.8/constant-evaluate.rs +++ b/tests/expectations/tests/libclang-3.8/constant-evaluate.rs @@ -7,7 +7,6 @@ pub const foo: _bindgen_ty_1 = _bindgen_ty_1::foo; pub const bar: _bindgen_ty_1 = _bindgen_ty_1::bar; #[repr(u32)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum _bindgen_ty_1 { foo = 4, bar = 8, } pub type EasyToOverflow = ::std::os::raw::c_ulonglong; diff --git a/tests/expectations/tests/libclang-3.9/constant-evaluate.rs b/tests/expectations/tests/libclang-3.9/constant-evaluate.rs index 76cbf24e..096bc182 100644 --- a/tests/expectations/tests/libclang-3.9/constant-evaluate.rs +++ b/tests/expectations/tests/libclang-3.9/constant-evaluate.rs @@ -7,7 +7,6 @@ pub const foo: _bindgen_ty_1 = _bindgen_ty_1::foo; pub const bar: _bindgen_ty_1 = _bindgen_ty_1::bar; #[repr(u32)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum _bindgen_ty_1 { foo = 4, diff --git a/tests/expectations/tests/libclang-4/constant-evaluate.rs b/tests/expectations/tests/libclang-4/constant-evaluate.rs index 76cbf24e..51365df5 100644 --- a/tests/expectations/tests/libclang-4/constant-evaluate.rs +++ b/tests/expectations/tests/libclang-4/constant-evaluate.rs @@ -1,13 +1,10 @@ /* automatically generated by rust-bindgen */ - #![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - pub const foo: _bindgen_ty_1 = _bindgen_ty_1::foo; pub const bar: _bindgen_ty_1 = _bindgen_ty_1::bar; #[repr(u32)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum _bindgen_ty_1 { foo = 4, diff --git a/tests/expectations/tests/nsStyleAutoArray.rs b/tests/expectations/tests/nsStyleAutoArray.rs index 199222ec..bd5e7f4b 100644 --- a/tests/expectations/tests/nsStyleAutoArray.rs +++ b/tests/expectations/tests/nsStyleAutoArray.rs @@ -1,9 +1,7 @@ /* automatically generated by rust-bindgen */ - #![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct nsTArray<T> { @@ -23,7 +21,6 @@ pub struct nsStyleAutoArray<T> { pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<T>>, } #[repr(i32)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum nsStyleAutoArray_WithSingleInitialElement { WITH_SINGLE_INITIAL_ELEMENT = 0, diff --git a/tests/expectations/tests/overflowed_enum.rs b/tests/expectations/tests/overflowed_enum.rs index 9104867d..25e91786 100644 --- a/tests/expectations/tests/overflowed_enum.rs +++ b/tests/expectations/tests/overflowed_enum.rs @@ -1,11 +1,8 @@ /* automatically generated by rust-bindgen */ - #![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - #[repr(u32)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum Foo { BAP_ARM = 9698489, @@ -13,7 +10,6 @@ pub enum Foo { BAP_X86_64 = 3128633167, } #[repr(u16)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum Bar { One = 1, diff --git a/tests/expectations/tests/prepend-enum-constified-variant.rs b/tests/expectations/tests/prepend-enum-constified-variant.rs index afe2c0b1..7f3b6746 100644 --- a/tests/expectations/tests/prepend-enum-constified-variant.rs +++ b/tests/expectations/tests/prepend-enum-constified-variant.rs @@ -1,12 +1,9 @@ /* automatically generated by rust-bindgen */ - #![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - pub const AV_CODEC_ID_TTF: AVCodecID = AVCodecID::AV_CODEC_ID_FIRST_UNKNOWN; #[repr(u32)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum AVCodecID { AV_CODEC_ID_FIRST_UNKNOWN = 98304, diff --git a/tests/expectations/tests/short-enums.rs b/tests/expectations/tests/short-enums.rs index 882b368c..a7739f21 100644 --- a/tests/expectations/tests/short-enums.rs +++ b/tests/expectations/tests/short-enums.rs @@ -1,23 +1,18 @@ /* automatically generated by rust-bindgen */ - #![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - #[repr(u8)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum one_byte_t { SOME_VALUE = 1, } #[repr(u16)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum two_byte_t { SOME_OTHER_VALUE = 256, } #[repr(u32)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum four_byte_t { SOME_BIGGER_VALUE = 16777216, diff --git a/tests/expectations/tests/struct_typedef.rs b/tests/expectations/tests/struct_typedef.rs index 0e615144..f85aeb4c 100644 --- a/tests/expectations/tests/struct_typedef.rs +++ b/tests/expectations/tests/struct_typedef.rs @@ -1,9 +1,7 @@ /* automatically generated by rust-bindgen */ - #![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)] pub struct typedef_named_struct { @@ -68,14 +66,12 @@ impl Default for _bindgen_ty_1 { pub type struct_ptr_t = *mut _bindgen_ty_1; pub type struct_ptr_ptr_t = *mut *mut _bindgen_ty_1; #[repr(u32)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum typedef_named_enum { ENUM_HAS_NAME = 1, } pub const ENUM_IS_ANON: _bindgen_ty_2 = _bindgen_ty_2::ENUM_IS_ANON; #[repr(u32)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum _bindgen_ty_2 { ENUM_IS_ANON = 0, diff --git a/tests/expectations/tests/struct_typedef_ns.rs b/tests/expectations/tests/struct_typedef_ns.rs index cbbdaa7b..79fa38de 100644 --- a/tests/expectations/tests/struct_typedef_ns.rs +++ b/tests/expectations/tests/struct_typedef_ns.rs @@ -1,9 +1,7 @@ /* automatically generated by rust-bindgen */ - #![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - #[allow(non_snake_case, non_camel_case_types, non_upper_case_globals)] pub mod root { #[allow(unused_imports)] @@ -40,7 +38,6 @@ pub mod root { ); } #[repr(u32)] - #[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum typedef_enum { BAR = 1, @@ -81,7 +78,6 @@ pub mod root { pub const _bindgen_mod_id_12_BAR: root::_bindgen_mod_id_12::_bindgen_ty_2 = _bindgen_ty_2::BAR; #[repr(u32)] - #[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum _bindgen_ty_2 { BAR = 1, diff --git a/tests/expectations/tests/weird_bitfields.rs b/tests/expectations/tests/weird_bitfields.rs index 22cd8ea5..8ab2987c 100644 --- a/tests/expectations/tests/weird_bitfields.rs +++ b/tests/expectations/tests/weird_bitfields.rs @@ -1,9 +1,7 @@ /* automatically generated by rust-bindgen */ - #![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - #[repr(C)] #[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] pub struct __BindgenBitfieldUnit<Storage, Align> @@ -84,7 +82,6 @@ where } } #[repr(u32)] -#[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum nsStyleSVGOpacitySource { eStyleSVGOpacitySource_Normal = 0, |