diff options
author | Darren Kulp <darren@kulp.ch> | 2020-06-23 05:35:09 -0700 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2020-06-29 03:39:19 +0200 |
commit | 0bc76716e58b3505c432ab695153b6d5b9a85cf4 (patch) | |
tree | 850442a39bf39d82f750884764d5c146ba70990b | |
parent | 01b1418800de854e6c73be69851fd9d2129dc642 (diff) |
Run `cargo +nightly fmt` on expectations
Impending overwrites to expectations should be as simple and regular as
possible, so get the formatting done here.
38 files changed, 392 insertions, 144 deletions
diff --git a/tests/expectations/tests/libclang-3.8/auto.rs b/tests/expectations/tests/libclang-3.8/auto.rs index 920023f3..b5958a04 100644 --- a/tests/expectations/tests/libclang-3.8/auto.rs +++ b/tests/expectations/tests/libclang-3.8/auto.rs @@ -1,8 +1,11 @@ /* automatically generated by rust-bindgen */ - -#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - +#![allow( + dead_code, + non_snake_case, + non_camel_case_types, + non_upper_case_globals +)] #[repr(C)] #[derive(Debug, Default, Copy, Clone)] diff --git a/tests/expectations/tests/libclang-3.8/call-conv-field.rs b/tests/expectations/tests/libclang-3.8/call-conv-field.rs index 1800b635..4324f9b7 100644 --- a/tests/expectations/tests/libclang-3.8/call-conv-field.rs +++ b/tests/expectations/tests/libclang-3.8/call-conv-field.rs @@ -12,7 +12,9 @@ #[derive(Default, Copy, Clone)] pub struct JNINativeInterface_ { pub GetVersion: ::std::option::Option< - unsafe extern "stdcall" fn(env: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int, + unsafe extern "stdcall" fn( + env: *mut ::std::os::raw::c_void, + ) -> ::std::os::raw::c_int, >, pub __hack: ::std::os::raw::c_ulonglong, } @@ -29,7 +31,10 @@ fn bindgen_test_layout_JNINativeInterface_() { concat!("Alignment of ", stringify!(JNINativeInterface_)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<JNINativeInterface_>())).GetVersion as *const _ as usize }, + unsafe { + &(*(::std::ptr::null::<JNINativeInterface_>())).GetVersion + as *const _ as usize + }, 0usize, concat!( "Offset of field: ", @@ -39,7 +44,10 @@ fn bindgen_test_layout_JNINativeInterface_() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<JNINativeInterface_>())).__hack as *const _ as usize }, + unsafe { + &(*(::std::ptr::null::<JNINativeInterface_>())).__hack as *const _ + as usize + }, 8usize, concat!( "Offset of field: ", diff --git a/tests/expectations/tests/libclang-3.8/const_bool.rs b/tests/expectations/tests/libclang-3.8/const_bool.rs index af5adcaf..c20c5546 100644 --- a/tests/expectations/tests/libclang-3.8/const_bool.rs +++ b/tests/expectations/tests/libclang-3.8/const_bool.rs @@ -1,8 +1,11 @@ /* automatically generated by rust-bindgen */ - -#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - +#![allow( + dead_code, + non_snake_case, + non_camel_case_types, + non_upper_case_globals +)] extern "C" { #[link_name = "\u{1}_ZL1k"] diff --git a/tests/expectations/tests/libclang-3.8/constant-evaluate.rs b/tests/expectations/tests/libclang-3.8/constant-evaluate.rs index 73455f3a..e988b40f 100644 --- a/tests/expectations/tests/libclang-3.8/constant-evaluate.rs +++ b/tests/expectations/tests/libclang-3.8/constant-evaluate.rs @@ -1,14 +1,20 @@ /* automatically generated by rust-bindgen */ - -#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - +#![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)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum _bindgen_ty_1 { foo = 4, bar = 8, } +pub enum _bindgen_ty_1 { + foo = 4, + bar = 8, +} pub type EasyToOverflow = ::std::os::raw::c_ulonglong; pub const k: EasyToOverflow = 2147483648; extern "C" { diff --git a/tests/expectations/tests/libclang-3.8/issue-769-bad-instantiation-test.rs b/tests/expectations/tests/libclang-3.8/issue-769-bad-instantiation-test.rs index 0603873d..48a07850 100644 --- a/tests/expectations/tests/libclang-3.8/issue-769-bad-instantiation-test.rs +++ b/tests/expectations/tests/libclang-3.8/issue-769-bad-instantiation-test.rs @@ -1,8 +1,11 @@ /* automatically generated by rust-bindgen */ - -#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - +#![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 { @@ -26,14 +29,35 @@ pub mod root { 4usize, concat!( "Size of template specialization: ", - stringify ! ( root :: Rooted < :: std :: os :: raw :: c_int > ) + stringify!(root::Rooted<::std::os::raw::c_int>) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::Rooted<::std::os::raw::c_int>>(), + 4usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::Rooted<::std::os::raw::c_int>) ) ); - assert_eq ! ( :: std :: mem :: align_of :: < root :: Rooted < :: std :: os :: raw :: c_int > > ( ) , 4usize , concat ! ( "Alignment of template specialization: " , stringify ! ( root :: Rooted < :: std :: os :: raw :: c_int > ) ) ); } #[test] fn __bindgen_test_layout_Rooted_open0_int_close0_instantiation_1() { - assert_eq ! ( :: std :: mem :: size_of :: < root :: Rooted < :: std :: os :: raw :: c_int > > ( ) , 4usize , concat ! ( "Size of template specialization: " , stringify ! ( root :: Rooted < :: std :: os :: raw :: c_int > ) ) ); - assert_eq ! ( :: std :: mem :: align_of :: < root :: Rooted < :: std :: os :: raw :: c_int > > ( ) , 4usize , concat ! ( "Alignment of template specialization: " , stringify ! ( root :: Rooted < :: std :: os :: raw :: c_int > ) ) ); + assert_eq!( + ::std::mem::size_of::<root::Rooted<::std::os::raw::c_int>>(), + 4usize, + concat!( + "Size of template specialization: ", + stringify!(root::Rooted<::std::os::raw::c_int>) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::Rooted<::std::os::raw::c_int>>(), + 4usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::Rooted<::std::os::raw::c_int>) + ) + ); } } diff --git a/tests/expectations/tests/libclang-3.8/mangling-win32.rs b/tests/expectations/tests/libclang-3.8/mangling-win32.rs index e920634e..f219089f 100644 --- a/tests/expectations/tests/libclang-3.8/mangling-win32.rs +++ b/tests/expectations/tests/libclang-3.8/mangling-win32.rs @@ -1,8 +1,11 @@ /* automatically generated by rust-bindgen */ - -#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - +#![allow( + dead_code, + non_snake_case, + non_camel_case_types, + non_upper_case_globals +)] extern "C" { pub fn foo(); diff --git a/tests/expectations/tests/libclang-3.8/objc_template.rs b/tests/expectations/tests/libclang-3.8/objc_template.rs index 23a6de90..22a6e17e 100644 --- a/tests/expectations/tests/libclang-3.8/objc_template.rs +++ b/tests/expectations/tests/libclang-3.8/objc_template.rs @@ -1,7 +1,11 @@ /* automatically generated by rust-bindgen */ - -#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] +#![allow( + dead_code, + non_snake_case, + non_camel_case_types, + non_upper_case_globals +)] #![cfg(target_os = "macos")] #[macro_use] diff --git a/tests/expectations/tests/libclang-3.8/partial-specialization-and-inheritance.rs b/tests/expectations/tests/libclang-3.8/partial-specialization-and-inheritance.rs index 3e3eb9c5..20b2f024 100644 --- a/tests/expectations/tests/libclang-3.8/partial-specialization-and-inheritance.rs +++ b/tests/expectations/tests/libclang-3.8/partial-specialization-and-inheritance.rs @@ -1,8 +1,11 @@ /* automatically generated by rust-bindgen */ - -#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - +#![allow( + dead_code, + non_snake_case, + non_camel_case_types, + non_upper_case_globals +)] #[repr(C)] #[derive(Debug, Default, Copy, Clone)] diff --git a/tests/expectations/tests/libclang-3.8/type_alias_template_specialized.rs b/tests/expectations/tests/libclang-3.8/type_alias_template_specialized.rs index a0d9ade6..6c171aec 100644 --- a/tests/expectations/tests/libclang-3.8/type_alias_template_specialized.rs +++ b/tests/expectations/tests/libclang-3.8/type_alias_template_specialized.rs @@ -1,8 +1,11 @@ /* automatically generated by rust-bindgen */ - -#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - +#![allow( + dead_code, + non_snake_case, + non_camel_case_types, + non_upper_case_globals +)] #[repr(C)] #[derive(Debug, Default, Copy, Clone)] diff --git a/tests/expectations/tests/libclang-3.9/auto.rs b/tests/expectations/tests/libclang-3.9/auto.rs index 2d7dfa3a..ab0c7dc0 100644 --- a/tests/expectations/tests/libclang-3.9/auto.rs +++ b/tests/expectations/tests/libclang-3.9/auto.rs @@ -1,8 +1,11 @@ /* automatically generated by rust-bindgen */ - -#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - +#![allow( + dead_code, + non_snake_case, + non_camel_case_types, + non_upper_case_globals +)] #[repr(C)] #[derive(Debug, Default, Copy, Clone)] diff --git a/tests/expectations/tests/libclang-3.9/call-conv-field.rs b/tests/expectations/tests/libclang-3.9/call-conv-field.rs index 7007d221..ea7c0e40 100644 --- a/tests/expectations/tests/libclang-3.9/call-conv-field.rs +++ b/tests/expectations/tests/libclang-3.9/call-conv-field.rs @@ -1,16 +1,20 @@ /* automatically generated by rust-bindgen */ - -#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] +#![allow( + dead_code, + non_snake_case, + non_camel_case_types, + non_upper_case_globals +)] #![cfg(not(test))] - #[repr(C)] #[derive(Default, Copy, Clone)] pub struct JNINativeInterface_ { pub GetVersion: ::std::option::Option< - unsafe extern "stdcall" fn(env: *mut ::std::os::raw::c_void) - -> ::std::os::raw::c_int, + unsafe extern "stdcall" fn( + env: *mut ::std::os::raw::c_void, + ) -> ::std::os::raw::c_int, >, pub __hack: ::std::os::raw::c_ulonglong, } @@ -27,7 +31,10 @@ fn bindgen_test_layout_JNINativeInterface_() { concat!("Alignment of ", stringify!(JNINativeInterface_)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<JNINativeInterface_>())).GetVersion as *const _ as usize }, + unsafe { + &(*(::std::ptr::null::<JNINativeInterface_>())).GetVersion + as *const _ as usize + }, 0usize, concat!( "Offset of field: ", @@ -37,7 +44,10 @@ fn bindgen_test_layout_JNINativeInterface_() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<JNINativeInterface_>())).__hack as *const _ as usize }, + unsafe { + &(*(::std::ptr::null::<JNINativeInterface_>())).__hack as *const _ + as usize + }, 8usize, concat!( "Offset of field: ", diff --git a/tests/expectations/tests/libclang-3.9/const_bool.rs b/tests/expectations/tests/libclang-3.9/const_bool.rs index 14f51394..5be78503 100644 --- a/tests/expectations/tests/libclang-3.9/const_bool.rs +++ b/tests/expectations/tests/libclang-3.9/const_bool.rs @@ -1,8 +1,11 @@ /* automatically generated by rust-bindgen */ - -#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - +#![allow( + dead_code, + non_snake_case, + non_camel_case_types, + non_upper_case_globals +)] pub const k: bool = true; #[repr(C)] diff --git a/tests/expectations/tests/libclang-3.9/constant-evaluate.rs b/tests/expectations/tests/libclang-3.9/constant-evaluate.rs index 7e6fcd60..87dafd63 100644 --- a/tests/expectations/tests/libclang-3.9/constant-evaluate.rs +++ b/tests/expectations/tests/libclang-3.9/constant-evaluate.rs @@ -1,8 +1,11 @@ /* automatically generated by rust-bindgen */ - -#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - +#![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; diff --git a/tests/expectations/tests/libclang-3.9/issue-769-bad-instantiation-test.rs b/tests/expectations/tests/libclang-3.9/issue-769-bad-instantiation-test.rs index 0603873d..48a07850 100644 --- a/tests/expectations/tests/libclang-3.9/issue-769-bad-instantiation-test.rs +++ b/tests/expectations/tests/libclang-3.9/issue-769-bad-instantiation-test.rs @@ -1,8 +1,11 @@ /* automatically generated by rust-bindgen */ - -#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - +#![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 { @@ -26,14 +29,35 @@ pub mod root { 4usize, concat!( "Size of template specialization: ", - stringify ! ( root :: Rooted < :: std :: os :: raw :: c_int > ) + stringify!(root::Rooted<::std::os::raw::c_int>) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::Rooted<::std::os::raw::c_int>>(), + 4usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::Rooted<::std::os::raw::c_int>) ) ); - assert_eq ! ( :: std :: mem :: align_of :: < root :: Rooted < :: std :: os :: raw :: c_int > > ( ) , 4usize , concat ! ( "Alignment of template specialization: " , stringify ! ( root :: Rooted < :: std :: os :: raw :: c_int > ) ) ); } #[test] fn __bindgen_test_layout_Rooted_open0_int_close0_instantiation_1() { - assert_eq ! ( :: std :: mem :: size_of :: < root :: Rooted < :: std :: os :: raw :: c_int > > ( ) , 4usize , concat ! ( "Size of template specialization: " , stringify ! ( root :: Rooted < :: std :: os :: raw :: c_int > ) ) ); - assert_eq ! ( :: std :: mem :: align_of :: < root :: Rooted < :: std :: os :: raw :: c_int > > ( ) , 4usize , concat ! ( "Alignment of template specialization: " , stringify ! ( root :: Rooted < :: std :: os :: raw :: c_int > ) ) ); + assert_eq!( + ::std::mem::size_of::<root::Rooted<::std::os::raw::c_int>>(), + 4usize, + concat!( + "Size of template specialization: ", + stringify!(root::Rooted<::std::os::raw::c_int>) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::Rooted<::std::os::raw::c_int>>(), + 4usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::Rooted<::std::os::raw::c_int>) + ) + ); } } diff --git a/tests/expectations/tests/libclang-3.9/mangling-win32.rs b/tests/expectations/tests/libclang-3.9/mangling-win32.rs index ad4ac42a..24cd4eb0 100644 --- a/tests/expectations/tests/libclang-3.9/mangling-win32.rs +++ b/tests/expectations/tests/libclang-3.9/mangling-win32.rs @@ -1,8 +1,11 @@ /* automatically generated by rust-bindgen */ - -#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - +#![allow( + dead_code, + non_snake_case, + non_camel_case_types, + non_upper_case_globals +)] extern "C" { pub fn foo(); diff --git a/tests/expectations/tests/libclang-3.9/objc_template.rs b/tests/expectations/tests/libclang-3.9/objc_template.rs index 23a6de90..22a6e17e 100644 --- a/tests/expectations/tests/libclang-3.9/objc_template.rs +++ b/tests/expectations/tests/libclang-3.9/objc_template.rs @@ -1,7 +1,11 @@ /* automatically generated by rust-bindgen */ - -#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] +#![allow( + dead_code, + non_snake_case, + non_camel_case_types, + non_upper_case_globals +)] #![cfg(target_os = "macos")] #[macro_use] diff --git a/tests/expectations/tests/libclang-3.9/partial-specialization-and-inheritance.rs b/tests/expectations/tests/libclang-3.9/partial-specialization-and-inheritance.rs index 97d2eabe..06ff6059 100644 --- a/tests/expectations/tests/libclang-3.9/partial-specialization-and-inheritance.rs +++ b/tests/expectations/tests/libclang-3.9/partial-specialization-and-inheritance.rs @@ -1,8 +1,11 @@ /* automatically generated by rust-bindgen */ - -#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - +#![allow( + dead_code, + non_snake_case, + non_camel_case_types, + non_upper_case_globals +)] #[repr(C)] #[derive(Debug, Default, Copy, Clone)] diff --git a/tests/expectations/tests/libclang-3.9/type_alias_template_specialized.rs b/tests/expectations/tests/libclang-3.9/type_alias_template_specialized.rs index a0d9ade6..6c171aec 100644 --- a/tests/expectations/tests/libclang-3.9/type_alias_template_specialized.rs +++ b/tests/expectations/tests/libclang-3.9/type_alias_template_specialized.rs @@ -1,8 +1,11 @@ /* automatically generated by rust-bindgen */ - -#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - +#![allow( + dead_code, + non_snake_case, + non_camel_case_types, + non_upper_case_globals +)] #[repr(C)] #[derive(Debug, Default, Copy, Clone)] diff --git a/tests/expectations/tests/libclang-4/auto.rs b/tests/expectations/tests/libclang-4/auto.rs index 2d7dfa3a..ab0c7dc0 100644 --- a/tests/expectations/tests/libclang-4/auto.rs +++ b/tests/expectations/tests/libclang-4/auto.rs @@ -1,8 +1,11 @@ /* automatically generated by rust-bindgen */ - -#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - +#![allow( + dead_code, + non_snake_case, + non_camel_case_types, + non_upper_case_globals +)] #[repr(C)] #[derive(Debug, Default, Copy, Clone)] diff --git a/tests/expectations/tests/libclang-4/call-conv-field.rs b/tests/expectations/tests/libclang-4/call-conv-field.rs index 7007d221..ea7c0e40 100644 --- a/tests/expectations/tests/libclang-4/call-conv-field.rs +++ b/tests/expectations/tests/libclang-4/call-conv-field.rs @@ -1,16 +1,20 @@ /* automatically generated by rust-bindgen */ - -#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] +#![allow( + dead_code, + non_snake_case, + non_camel_case_types, + non_upper_case_globals +)] #![cfg(not(test))] - #[repr(C)] #[derive(Default, Copy, Clone)] pub struct JNINativeInterface_ { pub GetVersion: ::std::option::Option< - unsafe extern "stdcall" fn(env: *mut ::std::os::raw::c_void) - -> ::std::os::raw::c_int, + unsafe extern "stdcall" fn( + env: *mut ::std::os::raw::c_void, + ) -> ::std::os::raw::c_int, >, pub __hack: ::std::os::raw::c_ulonglong, } @@ -27,7 +31,10 @@ fn bindgen_test_layout_JNINativeInterface_() { concat!("Alignment of ", stringify!(JNINativeInterface_)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<JNINativeInterface_>())).GetVersion as *const _ as usize }, + unsafe { + &(*(::std::ptr::null::<JNINativeInterface_>())).GetVersion + as *const _ as usize + }, 0usize, concat!( "Offset of field: ", @@ -37,7 +44,10 @@ fn bindgen_test_layout_JNINativeInterface_() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<JNINativeInterface_>())).__hack as *const _ as usize }, + unsafe { + &(*(::std::ptr::null::<JNINativeInterface_>())).__hack as *const _ + as usize + }, 8usize, concat!( "Offset of field: ", diff --git a/tests/expectations/tests/libclang-4/const_bool.rs b/tests/expectations/tests/libclang-4/const_bool.rs index 14f51394..5be78503 100644 --- a/tests/expectations/tests/libclang-4/const_bool.rs +++ b/tests/expectations/tests/libclang-4/const_bool.rs @@ -1,8 +1,11 @@ /* automatically generated by rust-bindgen */ - -#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - +#![allow( + dead_code, + non_snake_case, + non_camel_case_types, + non_upper_case_globals +)] pub const k: bool = true; #[repr(C)] diff --git a/tests/expectations/tests/libclang-4/issue-769-bad-instantiation-test.rs b/tests/expectations/tests/libclang-4/issue-769-bad-instantiation-test.rs index 86fad78d..daceec2e 100644 --- a/tests/expectations/tests/libclang-4/issue-769-bad-instantiation-test.rs +++ b/tests/expectations/tests/libclang-4/issue-769-bad-instantiation-test.rs @@ -1,8 +1,11 @@ /* automatically generated by rust-bindgen */ - -#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - +#![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 { @@ -27,14 +30,36 @@ pub mod root { 4usize, concat!( "Size of template specialization: ", - stringify ! ( root :: Rooted < :: std :: os :: raw :: c_int > ) + stringify!(root::Rooted<::std::os::raw::c_int>) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::Rooted<::std::os::raw::c_int>>(), + 4usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::Rooted<::std::os::raw::c_int>) ) ); - assert_eq ! ( :: std :: mem :: align_of :: < root :: Rooted < :: std :: os :: raw :: c_int > > ( ) , 4usize , concat ! ( "Alignment of template specialization: " , stringify ! ( root :: Rooted < :: std :: os :: raw :: c_int > ) ) ); } #[test] - fn __bindgen_test_layout_Rooted_open0_AutoValueVector_Alias_close0_instantiation() { - assert_eq ! ( :: std :: mem :: size_of :: < root :: Rooted < root :: AutoValueVector_Alias > > ( ) , 4usize , concat ! ( "Size of template specialization: " , stringify ! ( root :: Rooted < root :: AutoValueVector_Alias > ) ) ); - assert_eq ! ( :: std :: mem :: align_of :: < root :: Rooted < root :: AutoValueVector_Alias > > ( ) , 4usize , concat ! ( "Alignment of template specialization: " , stringify ! ( root :: Rooted < root :: AutoValueVector_Alias > ) ) ); + fn __bindgen_test_layout_Rooted_open0_AutoValueVector_Alias_close0_instantiation( + ) { + assert_eq!( + ::std::mem::size_of::<root::Rooted<root::AutoValueVector_Alias>>(), + 4usize, + concat!( + "Size of template specialization: ", + stringify!(root::Rooted<root::AutoValueVector_Alias>) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::Rooted<root::AutoValueVector_Alias>>(), + 4usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::Rooted<root::AutoValueVector_Alias>) + ) + ); } } diff --git a/tests/expectations/tests/libclang-4/mangling-win32.rs b/tests/expectations/tests/libclang-4/mangling-win32.rs index ad4ac42a..24cd4eb0 100644 --- a/tests/expectations/tests/libclang-4/mangling-win32.rs +++ b/tests/expectations/tests/libclang-4/mangling-win32.rs @@ -1,8 +1,11 @@ /* automatically generated by rust-bindgen */ - -#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - +#![allow( + dead_code, + non_snake_case, + non_camel_case_types, + non_upper_case_globals +)] extern "C" { pub fn foo(); diff --git a/tests/expectations/tests/libclang-4/objc_template.rs b/tests/expectations/tests/libclang-4/objc_template.rs index 25276c00..b4c11704 100644 --- a/tests/expectations/tests/libclang-4/objc_template.rs +++ b/tests/expectations/tests/libclang-4/objc_template.rs @@ -1,9 +1,12 @@ /* automatically generated by rust-bindgen */ - -#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - -#![cfg(target_os="macos")] +#![allow( + dead_code, + non_snake_case, + non_camel_case_types, + non_upper_case_globals +)] +#![cfg(target_os = "macos")] #[macro_use] extern crate objc; @@ -30,7 +33,7 @@ pub trait IFoo<ObjectType>: Sized + std::ops::Deref { where <Self as std::ops::Deref>::Target: objc::Message + Sized, { - msg_send!(self , get) + msg_send!(self, get) } } #[repr(transparent)] diff --git a/tests/expectations/tests/libclang-4/partial-specialization-and-inheritance.rs b/tests/expectations/tests/libclang-4/partial-specialization-and-inheritance.rs index 97d2eabe..06ff6059 100644 --- a/tests/expectations/tests/libclang-4/partial-specialization-and-inheritance.rs +++ b/tests/expectations/tests/libclang-4/partial-specialization-and-inheritance.rs @@ -1,8 +1,11 @@ /* automatically generated by rust-bindgen */ - -#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - +#![allow( + dead_code, + non_snake_case, + non_camel_case_types, + non_upper_case_globals +)] #[repr(C)] #[derive(Debug, Default, Copy, Clone)] diff --git a/tests/expectations/tests/libclang-4/type_alias_template_specialized.rs b/tests/expectations/tests/libclang-4/type_alias_template_specialized.rs index a09323a8..89e37fe8 100644 --- a/tests/expectations/tests/libclang-4/type_alias_template_specialized.rs +++ b/tests/expectations/tests/libclang-4/type_alias_template_specialized.rs @@ -1,8 +1,11 @@ /* automatically generated by rust-bindgen */ - -#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - +#![allow( + dead_code, + non_snake_case, + non_camel_case_types, + non_upper_case_globals +)] #[repr(C)] #[derive(Debug, Copy, Clone)] diff --git a/tests/expectations/tests/libclang-5/auto.rs b/tests/expectations/tests/libclang-5/auto.rs index 2d7dfa3a..ab0c7dc0 100644 --- a/tests/expectations/tests/libclang-5/auto.rs +++ b/tests/expectations/tests/libclang-5/auto.rs @@ -1,8 +1,11 @@ /* automatically generated by rust-bindgen */ - -#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - +#![allow( + dead_code, + non_snake_case, + non_camel_case_types, + non_upper_case_globals +)] #[repr(C)] #[derive(Debug, Default, Copy, Clone)] diff --git a/tests/expectations/tests/libclang-5/call-conv-field.rs b/tests/expectations/tests/libclang-5/call-conv-field.rs index 9cb9606f..ea7c0e40 100644 --- a/tests/expectations/tests/libclang-5/call-conv-field.rs +++ b/tests/expectations/tests/libclang-5/call-conv-field.rs @@ -12,7 +12,9 @@ #[derive(Default, Copy, Clone)] pub struct JNINativeInterface_ { pub GetVersion: ::std::option::Option< - unsafe extern "stdcall" fn(env: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int, + unsafe extern "stdcall" fn( + env: *mut ::std::os::raw::c_void, + ) -> ::std::os::raw::c_int, >, pub __hack: ::std::os::raw::c_ulonglong, } @@ -29,7 +31,10 @@ fn bindgen_test_layout_JNINativeInterface_() { concat!("Alignment of ", stringify!(JNINativeInterface_)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<JNINativeInterface_>())).GetVersion as *const _ as usize }, + unsafe { + &(*(::std::ptr::null::<JNINativeInterface_>())).GetVersion + as *const _ as usize + }, 0usize, concat!( "Offset of field: ", @@ -39,7 +44,10 @@ fn bindgen_test_layout_JNINativeInterface_() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<JNINativeInterface_>())).__hack as *const _ as usize }, + unsafe { + &(*(::std::ptr::null::<JNINativeInterface_>())).__hack as *const _ + as usize + }, 8usize, concat!( "Offset of field: ", diff --git a/tests/expectations/tests/libclang-5/const_bool.rs b/tests/expectations/tests/libclang-5/const_bool.rs index 14f51394..5be78503 100644 --- a/tests/expectations/tests/libclang-5/const_bool.rs +++ b/tests/expectations/tests/libclang-5/const_bool.rs @@ -1,8 +1,11 @@ /* automatically generated by rust-bindgen */ - -#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - +#![allow( + dead_code, + non_snake_case, + non_camel_case_types, + non_upper_case_globals +)] pub const k: bool = true; #[repr(C)] diff --git a/tests/expectations/tests/libclang-5/issue-769-bad-instantiation-test.rs b/tests/expectations/tests/libclang-5/issue-769-bad-instantiation-test.rs index 86fad78d..daceec2e 100644 --- a/tests/expectations/tests/libclang-5/issue-769-bad-instantiation-test.rs +++ b/tests/expectations/tests/libclang-5/issue-769-bad-instantiation-test.rs @@ -1,8 +1,11 @@ /* automatically generated by rust-bindgen */ - -#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - +#![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 { @@ -27,14 +30,36 @@ pub mod root { 4usize, concat!( "Size of template specialization: ", - stringify ! ( root :: Rooted < :: std :: os :: raw :: c_int > ) + stringify!(root::Rooted<::std::os::raw::c_int>) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::Rooted<::std::os::raw::c_int>>(), + 4usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::Rooted<::std::os::raw::c_int>) ) ); - assert_eq ! ( :: std :: mem :: align_of :: < root :: Rooted < :: std :: os :: raw :: c_int > > ( ) , 4usize , concat ! ( "Alignment of template specialization: " , stringify ! ( root :: Rooted < :: std :: os :: raw :: c_int > ) ) ); } #[test] - fn __bindgen_test_layout_Rooted_open0_AutoValueVector_Alias_close0_instantiation() { - assert_eq ! ( :: std :: mem :: size_of :: < root :: Rooted < root :: AutoValueVector_Alias > > ( ) , 4usize , concat ! ( "Size of template specialization: " , stringify ! ( root :: Rooted < root :: AutoValueVector_Alias > ) ) ); - assert_eq ! ( :: std :: mem :: align_of :: < root :: Rooted < root :: AutoValueVector_Alias > > ( ) , 4usize , concat ! ( "Alignment of template specialization: " , stringify ! ( root :: Rooted < root :: AutoValueVector_Alias > ) ) ); + fn __bindgen_test_layout_Rooted_open0_AutoValueVector_Alias_close0_instantiation( + ) { + assert_eq!( + ::std::mem::size_of::<root::Rooted<root::AutoValueVector_Alias>>(), + 4usize, + concat!( + "Size of template specialization: ", + stringify!(root::Rooted<root::AutoValueVector_Alias>) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::Rooted<root::AutoValueVector_Alias>>(), + 4usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::Rooted<root::AutoValueVector_Alias>) + ) + ); } } diff --git a/tests/expectations/tests/libclang-5/mangling-win32.rs b/tests/expectations/tests/libclang-5/mangling-win32.rs index ad4ac42a..24cd4eb0 100644 --- a/tests/expectations/tests/libclang-5/mangling-win32.rs +++ b/tests/expectations/tests/libclang-5/mangling-win32.rs @@ -1,8 +1,11 @@ /* automatically generated by rust-bindgen */ - -#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - +#![allow( + dead_code, + non_snake_case, + non_camel_case_types, + non_upper_case_globals +)] extern "C" { pub fn foo(); diff --git a/tests/expectations/tests/libclang-5/partial-specialization-and-inheritance.rs b/tests/expectations/tests/libclang-5/partial-specialization-and-inheritance.rs index 97d2eabe..06ff6059 100644 --- a/tests/expectations/tests/libclang-5/partial-specialization-and-inheritance.rs +++ b/tests/expectations/tests/libclang-5/partial-specialization-and-inheritance.rs @@ -1,8 +1,11 @@ /* automatically generated by rust-bindgen */ - -#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - +#![allow( + dead_code, + non_snake_case, + non_camel_case_types, + non_upper_case_globals +)] #[repr(C)] #[derive(Debug, Default, Copy, Clone)] diff --git a/tests/expectations/tests/libclang-9/auto.rs b/tests/expectations/tests/libclang-9/auto.rs index 2d7dfa3a..ab0c7dc0 100644 --- a/tests/expectations/tests/libclang-9/auto.rs +++ b/tests/expectations/tests/libclang-9/auto.rs @@ -1,8 +1,11 @@ /* automatically generated by rust-bindgen */ - -#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - +#![allow( + dead_code, + non_snake_case, + non_camel_case_types, + non_upper_case_globals +)] #[repr(C)] #[derive(Debug, Default, Copy, Clone)] diff --git a/tests/expectations/tests/libclang-9/const_bool.rs b/tests/expectations/tests/libclang-9/const_bool.rs index 14f51394..5be78503 100644 --- a/tests/expectations/tests/libclang-9/const_bool.rs +++ b/tests/expectations/tests/libclang-9/const_bool.rs @@ -1,8 +1,11 @@ /* automatically generated by rust-bindgen */ - -#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - +#![allow( + dead_code, + non_snake_case, + non_camel_case_types, + non_upper_case_globals +)] pub const k: bool = true; #[repr(C)] diff --git a/tests/expectations/tests/libclang-9/issue-769-bad-instantiation-test.rs b/tests/expectations/tests/libclang-9/issue-769-bad-instantiation-test.rs index 86fad78d..daceec2e 100644 --- a/tests/expectations/tests/libclang-9/issue-769-bad-instantiation-test.rs +++ b/tests/expectations/tests/libclang-9/issue-769-bad-instantiation-test.rs @@ -1,8 +1,11 @@ /* automatically generated by rust-bindgen */ - -#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - +#![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 { @@ -27,14 +30,36 @@ pub mod root { 4usize, concat!( "Size of template specialization: ", - stringify ! ( root :: Rooted < :: std :: os :: raw :: c_int > ) + stringify!(root::Rooted<::std::os::raw::c_int>) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::Rooted<::std::os::raw::c_int>>(), + 4usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::Rooted<::std::os::raw::c_int>) ) ); - assert_eq ! ( :: std :: mem :: align_of :: < root :: Rooted < :: std :: os :: raw :: c_int > > ( ) , 4usize , concat ! ( "Alignment of template specialization: " , stringify ! ( root :: Rooted < :: std :: os :: raw :: c_int > ) ) ); } #[test] - fn __bindgen_test_layout_Rooted_open0_AutoValueVector_Alias_close0_instantiation() { - assert_eq ! ( :: std :: mem :: size_of :: < root :: Rooted < root :: AutoValueVector_Alias > > ( ) , 4usize , concat ! ( "Size of template specialization: " , stringify ! ( root :: Rooted < root :: AutoValueVector_Alias > ) ) ); - assert_eq ! ( :: std :: mem :: align_of :: < root :: Rooted < root :: AutoValueVector_Alias > > ( ) , 4usize , concat ! ( "Alignment of template specialization: " , stringify ! ( root :: Rooted < root :: AutoValueVector_Alias > ) ) ); + fn __bindgen_test_layout_Rooted_open0_AutoValueVector_Alias_close0_instantiation( + ) { + assert_eq!( + ::std::mem::size_of::<root::Rooted<root::AutoValueVector_Alias>>(), + 4usize, + concat!( + "Size of template specialization: ", + stringify!(root::Rooted<root::AutoValueVector_Alias>) + ) + ); + assert_eq!( + ::std::mem::align_of::<root::Rooted<root::AutoValueVector_Alias>>(), + 4usize, + concat!( + "Alignment of template specialization: ", + stringify!(root::Rooted<root::AutoValueVector_Alias>) + ) + ); } } diff --git a/tests/expectations/tests/libclang-9/mangling-win32.rs b/tests/expectations/tests/libclang-9/mangling-win32.rs index ad4ac42a..24cd4eb0 100644 --- a/tests/expectations/tests/libclang-9/mangling-win32.rs +++ b/tests/expectations/tests/libclang-9/mangling-win32.rs @@ -1,8 +1,11 @@ /* automatically generated by rust-bindgen */ - -#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - +#![allow( + dead_code, + non_snake_case, + non_camel_case_types, + non_upper_case_globals +)] extern "C" { pub fn foo(); diff --git a/tests/expectations/tests/libclang-9/partial-specialization-and-inheritance.rs b/tests/expectations/tests/libclang-9/partial-specialization-and-inheritance.rs index 97d2eabe..06ff6059 100644 --- a/tests/expectations/tests/libclang-9/partial-specialization-and-inheritance.rs +++ b/tests/expectations/tests/libclang-9/partial-specialization-and-inheritance.rs @@ -1,8 +1,11 @@ /* automatically generated by rust-bindgen */ - -#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - +#![allow( + dead_code, + non_snake_case, + non_camel_case_types, + non_upper_case_globals +)] #[repr(C)] #[derive(Debug, Default, Copy, Clone)] diff --git a/tests/expectations/tests/wasm-import-module.rs b/tests/expectations/tests/wasm-import-module.rs index afbc5846..509fd560 100644 --- a/tests/expectations/tests/wasm-import-module.rs +++ b/tests/expectations/tests/wasm-import-module.rs @@ -10,4 +10,4 @@ #[link(wasm_import_module = "test-module")] extern "C" { pub fn test_function(); -}
\ No newline at end of file +} |