/third_party/rust/crates/io-lifetimes/tests/ |
H A D | assumptions.rs | 4 use std::mem::size_of; 9 assert_eq!(size_of::<std::os::unix::io::RawFd>(), size_of::<i32>()); in test_assumptions() 11 size_of::<std::os::unix::io::RawFd>(), in test_assumptions() 12 size_of::<std::os::raw::c_int>() in test_assumptions() 19 assert_eq!(size_of::<std::os::wasi::io::RawFd>(), size_of::<i32>()); in test_assumptions() 21 size_of::<std::os::wasi::io::RawFd>(), in test_assumptions() 22 size_of::<std::os::raw::c_int>() in test_assumptions() 30 size_of in test_assumptions() [all...] |
H A D | niche-optimizations.rs | 4 use std::mem::size_of; 21 assert_eq!(size_of::<Option<OwnedFd>>(), size_of::<RawFd>()); in test_niche_optimizations() 22 assert_eq!(size_of::<Option<BorrowedFd<'static>>>(), size_of::<RawFd>()); in test_niche_optimizations() 44 assert_eq!(size_of::<Option<OwnedSocket>>(), size_of::<RawSocket>()); in test_niche_optimizations_socket() 46 size_of::<Option<BorrowedSocket<'static>>>(), in test_niche_optimizations_socket() 47 size_of::<RawSocket>(), in test_niche_optimizations_socket()
|
/third_party/rust/crates/proc-macro2/tests/ |
H A D | test_size.rs | 8 assert_eq!(mem::size_of::<proc_macro::Span>(), 4); in test_proc_macro_span_size() 9 assert_eq!(mem::size_of::<Option<proc_macro::Span>>(), 4); in test_proc_macro_span_size() 15 assert_eq!(mem::size_of::<proc_macro2::Span>(), 0); in test_proc_macro2_fallback_span_size_without_locations() 16 assert_eq!(mem::size_of::<Option<proc_macro2::Span>>(), 1); in test_proc_macro2_fallback_span_size_without_locations() 22 assert_eq!(mem::size_of::<proc_macro2::Span>(), 8); in test_proc_macro2_fallback_span_size_with_locations() 23 assert_eq!(mem::size_of::<Option<proc_macro2::Span>>(), 12); in test_proc_macro2_fallback_span_size_with_locations() 33 assert_eq!(mem::size_of::<proc_macro2::Span>(), 4); in test_proc_macro2_wrapper_span_size_without_locations() 34 assert_eq!(mem::size_of::<Option<proc_macro2::Span>>(), 8); in test_proc_macro2_wrapper_span_size_without_locations() 40 assert_eq!(mem::size_of::<proc_macro2::Span>(), 12); in test_proc_macro2_wrapper_span_size_with_locations() 41 assert_eq!(mem::size_of in test_proc_macro2_wrapper_span_size_with_locations() [all...] |
/third_party/rust/crates/cxx/src/ |
H A D | rust_string.rs | 11 repr: [MaybeUninit<usize>; mem::size_of::<String>() / mem::size_of::<usize>()], 46 const_assert_eq!(mem::size_of::<[usize; 3]>(), mem::size_of::<RustString>()); 47 const_assert_eq!(mem::size_of::<String>(), mem::size_of::<RustString>());
|
H A D | rust_str.rs | 10 repr: [MaybeUninit<usize>; mem::size_of::<NonNull<str>>() / mem::size_of::<usize>()], 27 const_assert_eq!(mem::size_of::<NonNull<str>>(), mem::size_of::<RustStr>());
|
H A D | rust_slice.rs | 10 repr: [MaybeUninit<usize>; mem::size_of::<NonNull<[()]>>() / mem::size_of::<usize>()], 62 const_assert_eq!(mem::size_of::<NonNull<[()]>>(), mem::size_of::<RustSlice>());
|
/third_party/rust/crates/syn/tests/ |
H A D | test_size.rs | 11 assert_eq!(mem::size_of::<Expr>(), 176); in test_expr_size() 17 assert_eq!(mem::size_of::<Item>(), 360); in test_item_size() 23 assert_eq!(mem::size_of::<Type>(), 232); in test_type_size() 29 assert_eq!(mem::size_of::<Pat>(), 184); in test_pat_size() 35 assert_eq!(mem::size_of::<Lit>(), 24); in test_lit_size()
|
/third_party/rust/crates/bindgen/bindgen-tests/tests/expectations/tests/ |
H A D | sentry-defined-multiple-times.rs | 36 ::std::mem::size_of::<sentry>(), in bindgen_test_layout_sentry() 67 ::std::mem::size_of::<NotTemplateWrapper>(), in bindgen_test_layout_NotTemplateWrapper() 88 ::std::mem::size_of::<NotTemplateWrapper_sentry>(), in bindgen_test_layout_NotTemplateWrapper_sentry() 130 ::std::mem::size_of::<InlineNotTemplateWrapper_sentry>(), in bindgen_test_layout_InlineNotTemplateWrapper_sentry() 164 ::std::mem::size_of::<InlineNotTemplateWrapper>(), in bindgen_test_layout_InlineNotTemplateWrapper() 197 ::std::mem::size_of::<OuterDoubleWrapper_InnerDoubleWrapper>(), in bindgen_test_layout_OuterDoubleWrapper_InnerDoubleWrapper() 216 ::std::mem::size_of::<OuterDoubleWrapper>(), in bindgen_test_layout_OuterDoubleWrapper() 238 ::std::mem::size_of::< in bindgen_test_layout_OuterDoubleWrapper_InnerDoubleWrapper_sentry() 294 assert_eq ! (:: std :: mem :: size_of :: < OuterDoubleInlineWrapper_InnerDoubleInlineWrapper_sentry > () , 4usize , concat ! ("Size of: " , stringify ! (OuterDoubleInlineWrapper_InnerDoubleInlineWrapper_sentry))); in bindgen_test_layout_OuterDoubleInlineWrapper_InnerDoubleInlineWrapper_sentry() 302 ::std::mem::size_of in bindgen_test_layout_OuterDoubleInlineWrapper_InnerDoubleInlineWrapper() [all...] |
H A D | template_instantiation_with_fn_local_type.rs | 20 ::std::mem::size_of::<Foo>(), in __bindgen_test_layout_Foo_open0_Bar_close0_instantiation() 38 ::std::mem::size_of::<Baz>(), in bindgen_test_layout_Baz() 51 ::std::mem::size_of::<Foo>(), in __bindgen_test_layout_Foo_open0_Boo_close0_instantiation() 69 ::std::mem::size_of::<Bar>(), in bindgen_test_layout_Bar() 87 ::std::mem::size_of::<Boo>(), in bindgen_test_layout_Boo()
|
H A D | inherit-from-template-instantiation-with-vtable.rs | 36 ::std::mem::size_of::<DerivedWithNoVirtualMethods>(), in bindgen_test_layout_DerivedWithNoVirtualMethods() 64 ::std::mem::size_of::<DerivedWithVirtualMethods>(), in bindgen_test_layout_DerivedWithVirtualMethods() 111 ::std::mem::size_of::<DerivedWithVtable>(), in bindgen_test_layout_DerivedWithVtable() 139 ::std::mem::size_of::<DerivedWithoutVtable>(), in bindgen_test_layout_DerivedWithoutVtable() 161 ::std::mem::size_of::<BaseWithVtable<*mut ::std::os::raw::c_char>>(), in __bindgen_test_layout_BaseWithVtable_open0_ptr_char_close0_instantiation() 181 ::std::mem::size_of::<BaseWithVtable<*mut ::std::os::raw::c_char>>(), in __bindgen_test_layout_BaseWithVtable_open0_ptr_char_close0_instantiation_1() 201 ::std::mem::size_of::<BaseWithoutVtable<*mut ::std::os::raw::c_char>>(), in __bindgen_test_layout_BaseWithoutVtable_open0_ptr_char_close0_instantiation() 222 ::std::mem::size_of::<BaseWithoutVtable<*mut ::std::os::raw::c_char>>(), in __bindgen_test_layout_BaseWithoutVtable_open0_ptr_char_close0_instantiation_1()
|
H A D | class_1_0.rs | 93 ::std::mem::size_of::<C>(), in bindgen_test_layout_C() 151 ::std::mem::size_of::<C_with_zero_length_array>(), in bindgen_test_layout_C_with_zero_length_array() 217 ::std::mem::size_of::<C_with_zero_length_array_2>(), in bindgen_test_layout_C_with_zero_length_array_2() 259 ::std::mem::size_of::<C_with_incomplete_array>(), in bindgen_test_layout_C_with_incomplete_array() 287 ::std::mem::size_of::<C_with_incomplete_array_2>(), in bindgen_test_layout_C_with_incomplete_array_2() 307 ::std::mem::size_of::<C_with_zero_length_array_and_incomplete_array>(), in bindgen_test_layout_C_with_zero_length_array_and_incomplete_array() 342 ::std::mem::size_of::<C_with_zero_length_array_and_incomplete_array_2>( in bindgen_test_layout_C_with_zero_length_array_and_incomplete_array_2() 371 ::std::mem::size_of::<WithDtor>(), in bindgen_test_layout_WithDtor() 399 ::std::mem::size_of::<IncompleteArrayNonCopiable>(), in bindgen_test_layout_IncompleteArrayNonCopiable() 431 ::std::mem::size_of in bindgen_test_layout_Union() [all...] |
H A D | template.rs | 75 ::std::mem::size_of::<C>(), in bindgen_test_layout_C() 327 ::std::mem::size_of::<RootedContainer>(), in bindgen_test_layout_RootedContainer() 383 ::std::mem::size_of::<PODButContainsDtor>(), in bindgen_test_layout_PODButContainsDtor() 429 ::std::mem::size_of::<POD>(), in bindgen_test_layout_POD() 522 ::std::mem::size_of::<Untemplated>(), in bindgen_test_layout_Untemplated() 608 ::std::mem::size_of::<Foo<::std::os::raw::c_int>>(), in __bindgen_test_layout_Foo_open0_int_int_close0_instantiation() 627 ::std::mem::size_of::<B<::std::os::raw::c_uint>>(), in __bindgen_test_layout_B_open0_unsigned_int_close0_instantiation() 646 ::std::mem::size_of::<B<*const ::std::os::raw::c_int>>(), in __bindgen_test_layout_B_open0_ptr_const_int_close0_instantiation() 665 ::std::mem::size_of::<B<*const mozilla_Foo>>(), in __bindgen_test_layout_B_open0_ptr_const_mozilla__Foo_close0_instantiation() 685 ::std::mem::size_of in __bindgen_test_layout_B_open0_array1_ptr_const_mozilla__Foo_close0_instantiation() [all...] |
H A D | comment-indent.rs | 31 ::std::mem::size_of::<Foo_Bar>(), in bindgen_test_layout_Foo_Bar() 44 ::std::mem::size_of::<Foo>(), in bindgen_test_layout_Foo() 77 ::std::mem::size_of::<Baz>(), in bindgen_test_layout_Baz() 110 ::std::mem::size_of::<InInlineNS>(), in bindgen_test_layout_InInlineNS() 128 ::std::mem::size_of::<Bazz>(), in bindgen_test_layout_Bazz()
|
H A D | issue-807-opaque-types-methods-being-generated.rs | 16 ::std::mem::size_of::<Pupper>(), in bindgen_test_layout_Pupper() 34 ::std::mem::size_of::<Doggo>(), in bindgen_test_layout_Doggo() 52 ::std::mem::size_of::<SuchWow>(), in bindgen_test_layout_SuchWow() 71 ::std::mem::size_of::<Opaque>(), in bindgen_test_layout_Opaque() 116 ::std::mem::size_of::<Allowlisted>(), in bindgen_test_layout_Allowlisted()
|
H A D | crtp.rs | 21 ::std::mem::size_of::<Derived>(), in bindgen_test_layout_Derived() 44 ::std::mem::size_of::<DerivedFromBaseWithDestructor>(), in bindgen_test_layout_DerivedFromBaseWithDestructor() 57 ::std::mem::size_of::<Base>(), in __bindgen_test_layout_Base_open0_Derived_close0_instantiation() 71 ::std::mem::size_of::<BaseWithDestructor>(), in __bindgen_test_layout_BaseWithDestructor_open0_DerivedFromBaseWithDestructor_close0_instantiation()
|
H A D | disable-nested-struct-naming.rs | 42 ::std::mem::size_of::<bar4>(), in bindgen_test_layout_bar4() 63 ::std::mem::size_of::<bar1__bindgen_ty_1__bindgen_ty_1>(), in bindgen_test_layout_bar1__bindgen_ty_1__bindgen_ty_1() 102 ::std::mem::size_of::<bar1__bindgen_ty_1>(), in bindgen_test_layout_bar1__bindgen_ty_1() 138 ::std::mem::size_of::<bar1>(), in bindgen_test_layout_bar1() 164 ::std::mem::size_of::<foo>(), in bindgen_test_layout_foo() 200 ::std::mem::size_of::<baz>(), in bindgen_test_layout_baz() 221 ::std::mem::size_of::<_bindgen_ty_1__bindgen_ty_1>(), in bindgen_test_layout__bindgen_ty_1__bindgen_ty_1() 247 ::std::mem::size_of::<_bindgen_ty_1>(), in bindgen_test_layout__bindgen_ty_1()
|
H A D | class_with_inner_struct.rs | 27 ::std::mem::size_of::<A_Segment>(), in bindgen_test_layout_A_Segment() 68 ::std::mem::size_of::<A__bindgen_ty_1>(), in bindgen_test_layout_A__bindgen_ty_1() 108 ::std::mem::size_of::<A__bindgen_ty_2>(), in bindgen_test_layout_A__bindgen_ty_2() 143 ::std::mem::size_of::<A>(), in bindgen_test_layout_A() 196 ::std::mem::size_of::<B_Segment>(), in bindgen_test_layout_B_Segment() 232 ::std::mem::size_of::<B>(), in bindgen_test_layout_B() 281 ::std::mem::size_of::<C__bindgen_ty_1__bindgen_ty_1>(), in bindgen_test_layout_C__bindgen_ty_1__bindgen_ty_1() 343 ::std::mem::size_of::<C__bindgen_ty_1__bindgen_ty_2>(), in bindgen_test_layout_C__bindgen_ty_1__bindgen_ty_2() 390 ::std::mem::size_of::<C__bindgen_ty_1>(), in bindgen_test_layout_C__bindgen_ty_1() 431 ::std::mem::size_of in bindgen_test_layout_C_Segment() [all...] |
/third_party/rust/crates/rustc-hash/src/ |
H A D | lib.rs | 36 use core::mem::size_of; 92 assert!(size_of::<usize>() <= 8); in write() 93 while bytes.len() >= size_of::<usize>() { in write() 95 bytes = &bytes[size_of::<usize>()..]; in write() 97 if (size_of::<usize>() > 4) && (bytes.len() >= 4) { in write() 101 if (size_of::<usize>() > 2) && bytes.len() >= 2 { in write() 105 if (size_of::<usize>() > 1) && bytes.len() >= 1 { in write()
|
/third_party/rust/crates/regex/src/ |
H A D | prog.rs | 151 (self.len() * mem::size_of::<Inst>()) in approximate_size() 152 + (self.matches.len() * mem::size_of::<InstPtr>()) in approximate_size() 153 + (self.captures.len() * mem::size_of::<Option<String>>()) in approximate_size() 155 * (mem::size_of::<String>() + mem::size_of::<usize>())) in approximate_size() 156 + (self.byte_classes.len() * mem::size_of::<u8>()) in approximate_size() 441 use std::mem::size_of; in test_size_of_inst() 445 assert_eq!(32, size_of::<Inst>()); in test_size_of_inst()
|
/third_party/rust/crates/once_cell/examples/ |
H A D | bench.rs | 1 use std::mem::size_of; 18 println!("size_of::<OnceCell<()>>() = {:?}", size_of::<OnceCell<()>>()); in main() 19 println!("size_of::<OnceCell<bool>>() = {:?}", size_of::<OnceCell<bool>>()); in main() 20 println!("size_of::<OnceCell<u32>>() = {:?}", size_of::<OnceCell<u32>>()); in main()
|
/third_party/rust/crates/rustix/src/backend/libc/net/ |
H A D | read_sockaddr.rs | 11 use core::mem::size_of; 101 if len < size_of::<c::sa_family_t>() { 106 if len < size_of::<c::sockaddr_in>() { 116 if len < size_of::<c::sockaddr_in6>() { 182 assert!(len >= size_of::<c::sa_family_t>()); 195 assert!(len >= size_of::<c::sa_family_t>()); 208 assert!(len >= size_of::<c::sa_family_t>()); in inner_read_sockaddr_os() 211 assert!(len >= size_of::<c::sockaddr_in>()); in inner_read_sockaddr_os() 219 assert!(len >= size_of::<c::sockaddr_in6>()); in inner_read_sockaddr_os()
|
H A D | write_sockaddr.rs | 10 use core::mem::size_of; 35 sin_len: size_of::<c::sockaddr_in>() as _, 49 size_of::<c::sockaddr_in>() in write_sockaddr_v4() 64 size_of::<c::sockaddr_in6>() as _, 95 size_of::<c::sockaddr_in6>() in write_sockaddr_v6()
|
/third_party/rust/crates/memoffset/src/ |
H A D | span_of.rs | 207 assert_eq!(68..mem::size_of::<Blarg>(), span_of!(Blarg, egg)); in span_forms() 236 assert_eq!(span_of!(Test, ..), 0..mem::size_of::<Test>()); in ig_test() 239 offset_of!(Test, x)..mem::size_of::<Test>() in ig_test() 243 offset_of!(Test, y)..mem::size_of::<Test>() in ig_test() 248 offset_of!(Test, z)..mem::size_of::<Test>() in ig_test() 252 offset_of!(Test, egg)..mem::size_of::<Test>() in ig_test() 260 offset_of!(Test, x)..offset_of!(Test, y) + mem::size_of::<[u8; 56]>() in ig_test()
|
/third_party/rust/crates/rustix/src/backend/linux_raw/net/ |
H A D | read_sockaddr.rs | 9 use core::mem::size_of; 58 if len < size_of::<c::sa_family_t>() { 63 if len < size_of::<c::sockaddr_in>() { 73 if len < size_of::<c::sockaddr_in6>() { 132 assert!(len >= size_of::<c::sa_family_t>()); 135 assert!(len >= size_of::<c::sockaddr_in>()); 143 assert!(len >= size_of::<c::sockaddr_in6>());
|
/third_party/rust/crates/libc/src/ |
H A D | fixed_width_ints.rs | 85 static_assert_eq!(core::mem::size_of::<__int128>(), _SIZE_128); 88 static_assert_eq!(core::mem::size_of::<__uint128>(), _SIZE_128); 91 static_assert_eq!(core::mem::size_of::<__int128_t>(), _SIZE_128); 94 static_assert_eq!(core::mem::size_of::<__uint128_t>(), _SIZE_128);
|