Michael Forster | 82c02d3 | 2022-05-20 21:47:33 -0700 | [diff] [blame] | 1 | // Part of the Crubit project, under the Apache License v2.0 with LLVM |
| 2 | // Exceptions. See /LICENSE for license information. |
| 3 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 4 | |
Lukasz Anforowicz | 19e057d | 2022-10-28 12:03:23 -0700 | [diff] [blame] | 5 | // Automatically @generated Rust bindings for the following C++ target: |
Michael Forster | 82c02d3 | 2022-05-20 21:47:33 -0700 | [diff] [blame] | 6 | // //rs_bindings_from_cc/test/golden:bitfields_cc |
Devin Jeanpierre | 6ed0f60 | 2023-03-01 17:22:54 -0800 | [diff] [blame] | 7 | // Features: experimental, supported |
Lukasz Anforowicz | 19e057d | 2022-10-28 12:03:23 -0700 | [diff] [blame] | 8 | |
Devin Jeanpierre | 4335643 | 2023-01-13 12:39:02 -0800 | [diff] [blame] | 9 | #![rustfmt::skip] |
Googler | e842bf4 | 2023-04-24 06:03:47 -0700 | [diff] [blame] | 10 | #![feature( |
| 11 | custom_inner_attributes, |
| 12 | impl_trait_in_assoc_type, |
| 13 | negative_impls, |
| 14 | type_alias_impl_trait |
| 15 | )] |
Lukasz Anforowicz | 16889da | 2022-10-06 13:37:48 -0700 | [diff] [blame] | 16 | #![allow(stable_features)] |
Googler | 61afe91 | 2023-03-03 13:59:15 -0800 | [diff] [blame] | 17 | #![no_std] |
Lukasz Anforowicz | 4bb78a7 | 2023-03-06 14:10:37 -0800 | [diff] [blame] | 18 | #![allow(improper_ctypes)] |
Michael Forster | 82c02d3 | 2022-05-20 21:47:33 -0700 | [diff] [blame] | 19 | #![allow(non_camel_case_types)] |
| 20 | #![allow(non_snake_case)] |
| 21 | #![allow(non_upper_case_globals)] |
| 22 | #![deny(warnings)] |
| 23 | |
Michael Forster | 82c02d3 | 2022-05-20 21:47:33 -0700 | [diff] [blame] | 24 | // Part of the Crubit project, under the Apache License v2.0 with LLVM |
| 25 | // Exceptions. See /LICENSE for license information. |
| 26 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 27 | |
Devin Jeanpierre | cd5ebf3 | 2022-07-08 05:31:55 -0700 | [diff] [blame] | 28 | #[::ctor::recursively_pinned] |
Michael Forster | 82c02d3 | 2022-05-20 21:47:33 -0700 | [diff] [blame] | 29 | #[repr(C, align(4))] |
| 30 | pub struct WithBitfields { |
| 31 | // f1 : 2 bits |
Googler | bed0a2a | 2023-03-01 11:53:43 -0800 | [diff] [blame] | 32 | __bitfields0: [::core::mem::MaybeUninit<u8>; 1], |
Lukasz Anforowicz | 460e427 | 2023-05-18 16:11:46 -0700 | [diff] [blame] | 33 | pub f2: ::core::ffi::c_int, |
Michael Forster | 82c02d3 | 2022-05-20 21:47:33 -0700 | [diff] [blame] | 34 | // f3 : 4 bits |
| 35 | // f4 : 8 bits |
| 36 | // : 45 bits |
Googler | bed0a2a | 2023-03-01 11:53:43 -0800 | [diff] [blame] | 37 | __bitfields2: [::core::mem::MaybeUninit<u8>; 10], |
Lukasz Anforowicz | 460e427 | 2023-05-18 16:11:46 -0700 | [diff] [blame] | 38 | pub f5: ::core::ffi::c_int, |
Michael Forster | 82c02d3 | 2022-05-20 21:47:33 -0700 | [diff] [blame] | 39 | // f6 : 23 bits |
Googler | bed0a2a | 2023-03-01 11:53:43 -0800 | [diff] [blame] | 40 | __bitfields4: [::core::mem::MaybeUninit<u8>; 3], |
Devin Jeanpierre | 851a641 | 2023-04-13 14:38:14 -0700 | [diff] [blame] | 41 | /// Reason for representing this field as a blob of bytes: |
| 42 | /// `[[no_unique_address]]` attribute was present. |
Googler | bed0a2a | 2023-03-01 11:53:43 -0800 | [diff] [blame] | 43 | pub(crate) f7: [::core::mem::MaybeUninit<u8>; 1], |
Michael Forster | 82c02d3 | 2022-05-20 21:47:33 -0700 | [diff] [blame] | 44 | // f8 : 2 bits |
Googler | bed0a2a | 2023-03-01 11:53:43 -0800 | [diff] [blame] | 45 | __bitfields6: [::core::mem::MaybeUninit<u8>; 1], |
Michael Forster | 82c02d3 | 2022-05-20 21:47:33 -0700 | [diff] [blame] | 46 | } |
| 47 | forward_declare::unsafe_define!(forward_declare::symbol!("WithBitfields"), crate::WithBitfields); |
| 48 | impl WithBitfields { |
| 49 | pub fn f7(&self) -> &u8 { |
| 50 | unsafe { &*(&self.f7 as *const _ as *const u8) } |
| 51 | } |
| 52 | } |
| 53 | |
Devin Jeanpierre | cd5ebf3 | 2022-07-08 05:31:55 -0700 | [diff] [blame] | 54 | impl ::ctor::CtorNew<()> for WithBitfields { |
| 55 | type CtorType = impl ::ctor::Ctor<Output = Self>; |
Devin Jeanpierre | 5641325 | 2022-06-02 18:48:24 -0700 | [diff] [blame] | 56 | #[inline(always)] |
| 57 | fn ctor_new(args: ()) -> Self::CtorType { |
| 58 | let () = args; |
Devin Jeanpierre | 93927e8 | 2022-08-01 14:05:54 -0700 | [diff] [blame] | 59 | unsafe { |
Googler | bed0a2a | 2023-03-01 11:53:43 -0800 | [diff] [blame] | 60 | ::ctor::FnCtor::new( |
| 61 | move |dest: ::core::pin::Pin<&mut ::core::mem::MaybeUninit<Self>>| { |
| 62 | crate::detail::__rust_thunk___ZN13WithBitfieldsC1Ev( |
| 63 | ::core::pin::Pin::into_inner_unchecked(dest), |
| 64 | ); |
| 65 | }, |
| 66 | ) |
Devin Jeanpierre | 93927e8 | 2022-08-01 14:05:54 -0700 | [diff] [blame] | 67 | } |
Devin Jeanpierre | 5641325 | 2022-06-02 18:48:24 -0700 | [diff] [blame] | 68 | } |
| 69 | } |
Michael Forster | 82c02d3 | 2022-05-20 21:47:33 -0700 | [diff] [blame] | 70 | |
Felipe de A. Mello Pereira | 6f3cf16 | 2023-01-16 00:48:25 -0800 | [diff] [blame] | 71 | impl<'b> ::ctor::CtorNew<&'b Self> for WithBitfields { |
Devin Jeanpierre | 83cb2dc | 2022-07-15 01:50:28 -0700 | [diff] [blame] | 72 | type CtorType = impl ::ctor::Ctor<Output = Self> + ::ctor::Captures<'b>; |
Devin Jeanpierre | 5641325 | 2022-06-02 18:48:24 -0700 | [diff] [blame] | 73 | #[inline(always)] |
Felipe de A. Mello Pereira | 6f3cf16 | 2023-01-16 00:48:25 -0800 | [diff] [blame] | 74 | fn ctor_new(args: &'b Self) -> Self::CtorType { |
Devin Jeanpierre | 5641325 | 2022-06-02 18:48:24 -0700 | [diff] [blame] | 75 | let __param_0 = args; |
Devin Jeanpierre | 93927e8 | 2022-08-01 14:05:54 -0700 | [diff] [blame] | 76 | unsafe { |
Googler | bed0a2a | 2023-03-01 11:53:43 -0800 | [diff] [blame] | 77 | ::ctor::FnCtor::new( |
| 78 | move |dest: ::core::pin::Pin<&mut ::core::mem::MaybeUninit<Self>>| { |
| 79 | crate::detail::__rust_thunk___ZN13WithBitfieldsC1ERKS_( |
| 80 | ::core::pin::Pin::into_inner_unchecked(dest), |
| 81 | __param_0, |
| 82 | ); |
| 83 | }, |
| 84 | ) |
Devin Jeanpierre | 93927e8 | 2022-08-01 14:05:54 -0700 | [diff] [blame] | 85 | } |
Devin Jeanpierre | 5641325 | 2022-06-02 18:48:24 -0700 | [diff] [blame] | 86 | } |
| 87 | } |
Felipe de A. Mello Pereira | 6f3cf16 | 2023-01-16 00:48:25 -0800 | [diff] [blame] | 88 | impl<'b> ::ctor::CtorNew<(&'b Self,)> for WithBitfields { |
Devin Jeanpierre | 83cb2dc | 2022-07-15 01:50:28 -0700 | [diff] [blame] | 89 | type CtorType = impl ::ctor::Ctor<Output = Self> + ::ctor::Captures<'b>; |
Devin Jeanpierre | 5641325 | 2022-06-02 18:48:24 -0700 | [diff] [blame] | 90 | #[inline(always)] |
Felipe de A. Mello Pereira | 6f3cf16 | 2023-01-16 00:48:25 -0800 | [diff] [blame] | 91 | fn ctor_new(args: (&'b Self,)) -> Self::CtorType { |
Devin Jeanpierre | 5641325 | 2022-06-02 18:48:24 -0700 | [diff] [blame] | 92 | let (arg,) = args; |
Felipe de A. Mello Pereira | 6f3cf16 | 2023-01-16 00:48:25 -0800 | [diff] [blame] | 93 | <Self as ::ctor::CtorNew<&'b Self>>::ctor_new(arg) |
Devin Jeanpierre | 5641325 | 2022-06-02 18:48:24 -0700 | [diff] [blame] | 94 | } |
| 95 | } |
Michael Forster | 82c02d3 | 2022-05-20 21:47:33 -0700 | [diff] [blame] | 96 | |
Felipe de A. Mello Pereira | 6f3cf16 | 2023-01-16 00:48:25 -0800 | [diff] [blame] | 97 | impl<'b> ::ctor::CtorNew<::ctor::RvalueReference<'b, Self>> for WithBitfields { |
Devin Jeanpierre | 83cb2dc | 2022-07-15 01:50:28 -0700 | [diff] [blame] | 98 | type CtorType = impl ::ctor::Ctor<Output = Self> + ::ctor::Captures<'b>; |
Devin Jeanpierre | 5641325 | 2022-06-02 18:48:24 -0700 | [diff] [blame] | 99 | #[inline(always)] |
Felipe de A. Mello Pereira | 6f3cf16 | 2023-01-16 00:48:25 -0800 | [diff] [blame] | 100 | fn ctor_new(args: ::ctor::RvalueReference<'b, Self>) -> Self::CtorType { |
Devin Jeanpierre | 5641325 | 2022-06-02 18:48:24 -0700 | [diff] [blame] | 101 | let __param_0 = args; |
Devin Jeanpierre | 93927e8 | 2022-08-01 14:05:54 -0700 | [diff] [blame] | 102 | unsafe { |
Googler | bed0a2a | 2023-03-01 11:53:43 -0800 | [diff] [blame] | 103 | ::ctor::FnCtor::new( |
| 104 | move |dest: ::core::pin::Pin<&mut ::core::mem::MaybeUninit<Self>>| { |
| 105 | crate::detail::__rust_thunk___ZN13WithBitfieldsC1EOS_( |
| 106 | ::core::pin::Pin::into_inner_unchecked(dest), |
| 107 | __param_0, |
| 108 | ); |
| 109 | }, |
| 110 | ) |
Devin Jeanpierre | 93927e8 | 2022-08-01 14:05:54 -0700 | [diff] [blame] | 111 | } |
Devin Jeanpierre | 5641325 | 2022-06-02 18:48:24 -0700 | [diff] [blame] | 112 | } |
| 113 | } |
Felipe de A. Mello Pereira | 6f3cf16 | 2023-01-16 00:48:25 -0800 | [diff] [blame] | 114 | impl<'b> ::ctor::CtorNew<(::ctor::RvalueReference<'b, Self>,)> for WithBitfields { |
Devin Jeanpierre | 83cb2dc | 2022-07-15 01:50:28 -0700 | [diff] [blame] | 115 | type CtorType = impl ::ctor::Ctor<Output = Self> + ::ctor::Captures<'b>; |
Devin Jeanpierre | 5641325 | 2022-06-02 18:48:24 -0700 | [diff] [blame] | 116 | #[inline(always)] |
Felipe de A. Mello Pereira | 6f3cf16 | 2023-01-16 00:48:25 -0800 | [diff] [blame] | 117 | fn ctor_new(args: (::ctor::RvalueReference<'b, Self>,)) -> Self::CtorType { |
Devin Jeanpierre | 5641325 | 2022-06-02 18:48:24 -0700 | [diff] [blame] | 118 | let (arg,) = args; |
Felipe de A. Mello Pereira | 6f3cf16 | 2023-01-16 00:48:25 -0800 | [diff] [blame] | 119 | <Self as ::ctor::CtorNew<::ctor::RvalueReference<'b, Self>>>::ctor_new(arg) |
Devin Jeanpierre | 5641325 | 2022-06-02 18:48:24 -0700 | [diff] [blame] | 120 | } |
| 121 | } |
Michael Forster | 82c02d3 | 2022-05-20 21:47:33 -0700 | [diff] [blame] | 122 | |
Felipe de A. Mello Pereira | 5b9ad75 | 2023-01-11 01:03:23 -0800 | [diff] [blame] | 123 | impl<'b> ::ctor::Assign<&'b Self> for WithBitfields { |
Devin Jeanpierre | 9ced4ef | 2022-06-08 12:39:10 -0700 | [diff] [blame] | 124 | #[inline(always)] |
Googler | bed0a2a | 2023-03-01 11:53:43 -0800 | [diff] [blame] | 125 | fn assign<'a>(self: ::core::pin::Pin<&'a mut Self>, __param_0: &'b Self) { |
Devin Jeanpierre | 9ced4ef | 2022-06-08 12:39:10 -0700 | [diff] [blame] | 126 | unsafe { |
| 127 | crate::detail::__rust_thunk___ZN13WithBitfieldsaSERKS_(self, __param_0); |
| 128 | } |
| 129 | } |
| 130 | } |
Michael Forster | 82c02d3 | 2022-05-20 21:47:33 -0700 | [diff] [blame] | 131 | |
Felipe de A. Mello Pereira | 6f3cf16 | 2023-01-16 00:48:25 -0800 | [diff] [blame] | 132 | impl<'b> ::ctor::Assign<::ctor::RvalueReference<'b, Self>> for WithBitfields { |
Devin Jeanpierre | 9ced4ef | 2022-06-08 12:39:10 -0700 | [diff] [blame] | 133 | #[inline(always)] |
| 134 | fn assign<'a>( |
Googler | bed0a2a | 2023-03-01 11:53:43 -0800 | [diff] [blame] | 135 | self: ::core::pin::Pin<&'a mut Self>, |
Felipe de A. Mello Pereira | 6f3cf16 | 2023-01-16 00:48:25 -0800 | [diff] [blame] | 136 | __param_0: ::ctor::RvalueReference<'b, Self>, |
Devin Jeanpierre | 9ced4ef | 2022-06-08 12:39:10 -0700 | [diff] [blame] | 137 | ) { |
| 138 | unsafe { |
| 139 | crate::detail::__rust_thunk___ZN13WithBitfieldsaSEOS_(self, __param_0); |
| 140 | } |
| 141 | } |
| 142 | } |
Michael Forster | 82c02d3 | 2022-05-20 21:47:33 -0700 | [diff] [blame] | 143 | |
Lukasz Anforowicz | cc638f9 | 2023-05-26 11:39:04 -0700 | [diff] [blame] | 144 | /// This is a regression test for b/283835873 where the alignment of the |
| 145 | /// generated struct was wrong/missing. |
| 146 | #[::ctor::recursively_pinned] |
| 147 | #[repr(C, align(4))] |
| 148 | pub struct AlignmentRegressionTest { |
| 149 | // code_point : 31 bits |
| 150 | // status : 1 bits |
| 151 | __bitfields0: [::core::mem::MaybeUninit<u8>; 4], |
| 152 | } |
| 153 | forward_declare::unsafe_define!( |
| 154 | forward_declare::symbol!("AlignmentRegressionTest"), |
| 155 | crate::AlignmentRegressionTest |
| 156 | ); |
| 157 | |
| 158 | impl ::ctor::CtorNew<()> for AlignmentRegressionTest { |
| 159 | type CtorType = impl ::ctor::Ctor<Output = Self>; |
| 160 | #[inline(always)] |
| 161 | fn ctor_new(args: ()) -> Self::CtorType { |
| 162 | let () = args; |
| 163 | unsafe { |
| 164 | ::ctor::FnCtor::new( |
| 165 | move |dest: ::core::pin::Pin<&mut ::core::mem::MaybeUninit<Self>>| { |
| 166 | crate::detail::__rust_thunk___ZN23AlignmentRegressionTestC1Ev( |
| 167 | ::core::pin::Pin::into_inner_unchecked(dest), |
| 168 | ); |
| 169 | }, |
| 170 | ) |
| 171 | } |
| 172 | } |
| 173 | } |
| 174 | |
| 175 | impl<'b> ::ctor::CtorNew<&'b Self> for AlignmentRegressionTest { |
| 176 | type CtorType = impl ::ctor::Ctor<Output = Self> + ::ctor::Captures<'b>; |
| 177 | #[inline(always)] |
| 178 | fn ctor_new(args: &'b Self) -> Self::CtorType { |
| 179 | let __param_0 = args; |
| 180 | unsafe { |
| 181 | ::ctor::FnCtor::new( |
| 182 | move |dest: ::core::pin::Pin<&mut ::core::mem::MaybeUninit<Self>>| { |
| 183 | crate::detail::__rust_thunk___ZN23AlignmentRegressionTestC1ERKS_( |
| 184 | ::core::pin::Pin::into_inner_unchecked(dest), |
| 185 | __param_0, |
| 186 | ); |
| 187 | }, |
| 188 | ) |
| 189 | } |
| 190 | } |
| 191 | } |
| 192 | impl<'b> ::ctor::CtorNew<(&'b Self,)> for AlignmentRegressionTest { |
| 193 | type CtorType = impl ::ctor::Ctor<Output = Self> + ::ctor::Captures<'b>; |
| 194 | #[inline(always)] |
| 195 | fn ctor_new(args: (&'b Self,)) -> Self::CtorType { |
| 196 | let (arg,) = args; |
| 197 | <Self as ::ctor::CtorNew<&'b Self>>::ctor_new(arg) |
| 198 | } |
| 199 | } |
| 200 | |
| 201 | impl<'b> ::ctor::CtorNew<::ctor::RvalueReference<'b, Self>> for AlignmentRegressionTest { |
| 202 | type CtorType = impl ::ctor::Ctor<Output = Self> + ::ctor::Captures<'b>; |
| 203 | #[inline(always)] |
| 204 | fn ctor_new(args: ::ctor::RvalueReference<'b, Self>) -> Self::CtorType { |
| 205 | let __param_0 = args; |
| 206 | unsafe { |
| 207 | ::ctor::FnCtor::new( |
| 208 | move |dest: ::core::pin::Pin<&mut ::core::mem::MaybeUninit<Self>>| { |
| 209 | crate::detail::__rust_thunk___ZN23AlignmentRegressionTestC1EOS_( |
| 210 | ::core::pin::Pin::into_inner_unchecked(dest), |
| 211 | __param_0, |
| 212 | ); |
| 213 | }, |
| 214 | ) |
| 215 | } |
| 216 | } |
| 217 | } |
| 218 | impl<'b> ::ctor::CtorNew<(::ctor::RvalueReference<'b, Self>,)> for AlignmentRegressionTest { |
| 219 | type CtorType = impl ::ctor::Ctor<Output = Self> + ::ctor::Captures<'b>; |
| 220 | #[inline(always)] |
| 221 | fn ctor_new(args: (::ctor::RvalueReference<'b, Self>,)) -> Self::CtorType { |
| 222 | let (arg,) = args; |
| 223 | <Self as ::ctor::CtorNew<::ctor::RvalueReference<'b, Self>>>::ctor_new(arg) |
| 224 | } |
| 225 | } |
| 226 | |
| 227 | impl<'b> ::ctor::Assign<&'b Self> for AlignmentRegressionTest { |
| 228 | #[inline(always)] |
| 229 | fn assign<'a>(self: ::core::pin::Pin<&'a mut Self>, __param_0: &'b Self) { |
| 230 | unsafe { |
| 231 | crate::detail::__rust_thunk___ZN23AlignmentRegressionTestaSERKS_(self, __param_0); |
| 232 | } |
| 233 | } |
| 234 | } |
| 235 | |
| 236 | impl<'b> ::ctor::Assign<::ctor::RvalueReference<'b, Self>> for AlignmentRegressionTest { |
| 237 | #[inline(always)] |
| 238 | fn assign<'a>( |
| 239 | self: ::core::pin::Pin<&'a mut Self>, |
| 240 | __param_0: ::ctor::RvalueReference<'b, Self>, |
| 241 | ) { |
| 242 | unsafe { |
| 243 | crate::detail::__rust_thunk___ZN23AlignmentRegressionTestaSEOS_(self, __param_0); |
| 244 | } |
| 245 | } |
| 246 | } |
| 247 | |
| 248 | // Error while generating bindings for item 'AlignmentRegressionTest::(unnamed enum at ./rs_bindings_from_cc/test/golden/bitfields.h:26:3)': |
| 249 | // Unnamed enums are not supported yet |
| 250 | |
Michael Forster | 82c02d3 | 2022-05-20 21:47:33 -0700 | [diff] [blame] | 251 | // CRUBIT_RS_BINDINGS_FROM_CC_TEST_GOLDEN_BITFIELDS_H_ |
| 252 | |
Devin Jeanpierre | 5641325 | 2022-06-02 18:48:24 -0700 | [diff] [blame] | 253 | mod detail { |
| 254 | #[allow(unused_imports)] |
| 255 | use super::*; |
| 256 | extern "C" { |
| 257 | pub(crate) fn __rust_thunk___ZN13WithBitfieldsC1Ev<'a>( |
Googler | bed0a2a | 2023-03-01 11:53:43 -0800 | [diff] [blame] | 258 | __this: &'a mut ::core::mem::MaybeUninit<crate::WithBitfields>, |
Devin Jeanpierre | 5641325 | 2022-06-02 18:48:24 -0700 | [diff] [blame] | 259 | ); |
| 260 | pub(crate) fn __rust_thunk___ZN13WithBitfieldsC1ERKS_<'a, 'b>( |
Googler | bed0a2a | 2023-03-01 11:53:43 -0800 | [diff] [blame] | 261 | __this: &'a mut ::core::mem::MaybeUninit<crate::WithBitfields>, |
Devin Jeanpierre | 5641325 | 2022-06-02 18:48:24 -0700 | [diff] [blame] | 262 | __param_0: &'b crate::WithBitfields, |
| 263 | ); |
| 264 | pub(crate) fn __rust_thunk___ZN13WithBitfieldsC1EOS_<'a, 'b>( |
Googler | bed0a2a | 2023-03-01 11:53:43 -0800 | [diff] [blame] | 265 | __this: &'a mut ::core::mem::MaybeUninit<crate::WithBitfields>, |
Devin Jeanpierre | cd5ebf3 | 2022-07-08 05:31:55 -0700 | [diff] [blame] | 266 | __param_0: ::ctor::RvalueReference<'b, crate::WithBitfields>, |
Devin Jeanpierre | 5641325 | 2022-06-02 18:48:24 -0700 | [diff] [blame] | 267 | ); |
Devin Jeanpierre | 9ced4ef | 2022-06-08 12:39:10 -0700 | [diff] [blame] | 268 | pub(crate) fn __rust_thunk___ZN13WithBitfieldsaSERKS_<'a, 'b>( |
Googler | bed0a2a | 2023-03-01 11:53:43 -0800 | [diff] [blame] | 269 | __this: ::core::pin::Pin<&'a mut crate::WithBitfields>, |
Devin Jeanpierre | 9ced4ef | 2022-06-08 12:39:10 -0700 | [diff] [blame] | 270 | __param_0: &'b crate::WithBitfields, |
Googler | bed0a2a | 2023-03-01 11:53:43 -0800 | [diff] [blame] | 271 | ) -> ::core::pin::Pin<&'a mut crate::WithBitfields>; |
Devin Jeanpierre | 9ced4ef | 2022-06-08 12:39:10 -0700 | [diff] [blame] | 272 | pub(crate) fn __rust_thunk___ZN13WithBitfieldsaSEOS_<'a, 'b>( |
Googler | bed0a2a | 2023-03-01 11:53:43 -0800 | [diff] [blame] | 273 | __this: ::core::pin::Pin<&'a mut crate::WithBitfields>, |
Devin Jeanpierre | cd5ebf3 | 2022-07-08 05:31:55 -0700 | [diff] [blame] | 274 | __param_0: ::ctor::RvalueReference<'b, crate::WithBitfields>, |
Googler | bed0a2a | 2023-03-01 11:53:43 -0800 | [diff] [blame] | 275 | ) -> ::core::pin::Pin<&'a mut crate::WithBitfields>; |
Lukasz Anforowicz | cc638f9 | 2023-05-26 11:39:04 -0700 | [diff] [blame] | 276 | pub(crate) fn __rust_thunk___ZN23AlignmentRegressionTestC1Ev<'a>( |
| 277 | __this: &'a mut ::core::mem::MaybeUninit<crate::AlignmentRegressionTest>, |
| 278 | ); |
| 279 | pub(crate) fn __rust_thunk___ZN23AlignmentRegressionTestC1ERKS_<'a, 'b>( |
| 280 | __this: &'a mut ::core::mem::MaybeUninit<crate::AlignmentRegressionTest>, |
| 281 | __param_0: &'b crate::AlignmentRegressionTest, |
| 282 | ); |
| 283 | pub(crate) fn __rust_thunk___ZN23AlignmentRegressionTestC1EOS_<'a, 'b>( |
| 284 | __this: &'a mut ::core::mem::MaybeUninit<crate::AlignmentRegressionTest>, |
| 285 | __param_0: ::ctor::RvalueReference<'b, crate::AlignmentRegressionTest>, |
| 286 | ); |
| 287 | pub(crate) fn __rust_thunk___ZN23AlignmentRegressionTestaSERKS_<'a, 'b>( |
| 288 | __this: ::core::pin::Pin<&'a mut crate::AlignmentRegressionTest>, |
| 289 | __param_0: &'b crate::AlignmentRegressionTest, |
| 290 | ) -> ::core::pin::Pin<&'a mut crate::AlignmentRegressionTest>; |
| 291 | pub(crate) fn __rust_thunk___ZN23AlignmentRegressionTestaSEOS_<'a, 'b>( |
| 292 | __this: ::core::pin::Pin<&'a mut crate::AlignmentRegressionTest>, |
| 293 | __param_0: ::ctor::RvalueReference<'b, crate::AlignmentRegressionTest>, |
| 294 | ) -> ::core::pin::Pin<&'a mut crate::AlignmentRegressionTest>; |
Devin Jeanpierre | 5641325 | 2022-06-02 18:48:24 -0700 | [diff] [blame] | 295 | } |
| 296 | } |
| 297 | |
Googler | bed0a2a | 2023-03-01 11:53:43 -0800 | [diff] [blame] | 298 | const _: () = assert!(::core::mem::size_of::<Option<&i32>>() == ::core::mem::size_of::<&i32>()); |
Michael Forster | 82c02d3 | 2022-05-20 21:47:33 -0700 | [diff] [blame] | 299 | |
Googler | bed0a2a | 2023-03-01 11:53:43 -0800 | [diff] [blame] | 300 | const _: () = assert!(::core::mem::size_of::<crate::WithBitfields>() == 32); |
| 301 | const _: () = assert!(::core::mem::align_of::<crate::WithBitfields>() == 4); |
Michael Forster | 82c02d3 | 2022-05-20 21:47:33 -0700 | [diff] [blame] | 302 | const _: () = { |
Googler | 9e3ef6d | 2023-05-05 08:09:23 -0700 | [diff] [blame] | 303 | static_assertions::assert_not_impl_any!(crate::WithBitfields:Copy); |
Michael Forster | 82c02d3 | 2022-05-20 21:47:33 -0700 | [diff] [blame] | 304 | }; |
| 305 | const _: () = { |
Googler | 9e3ef6d | 2023-05-05 08:09:23 -0700 | [diff] [blame] | 306 | static_assertions::assert_not_impl_any!(crate::WithBitfields:Drop); |
Michael Forster | 82c02d3 | 2022-05-20 21:47:33 -0700 | [diff] [blame] | 307 | }; |
Lukasz Anforowicz | ed94b24 | 2022-09-07 11:47:58 -0700 | [diff] [blame] | 308 | const _: () = assert!(memoffset::offset_of!(crate::WithBitfields, f2) == 4); |
| 309 | const _: () = assert!(memoffset::offset_of!(crate::WithBitfields, f5) == 20); |
| 310 | const _: () = assert!(memoffset::offset_of!(crate::WithBitfields, f7) == 27); |
Lukasz Anforowicz | cc638f9 | 2023-05-26 11:39:04 -0700 | [diff] [blame] | 311 | |
| 312 | const _: () = assert!(::core::mem::size_of::<crate::AlignmentRegressionTest>() == 4); |
| 313 | const _: () = assert!(::core::mem::align_of::<crate::AlignmentRegressionTest>() == 4); |
| 314 | const _: () = { |
| 315 | static_assertions::assert_not_impl_any!(crate::AlignmentRegressionTest:Copy); |
| 316 | }; |
| 317 | const _: () = { |
| 318 | static_assertions::assert_not_impl_any!(crate::AlignmentRegressionTest:Drop); |
| 319 | }; |