Use `::foo` for crate dependencies, instead of `foo`. In the special case of `::std`, this also completely removes the need for `rust_std` to disambiguate from C++ std. PiperOrigin-RevId: 459736798
diff --git a/rs_bindings_from_cc/src_code_gen.rs b/rs_bindings_from_cc/src_code_gen.rs index 1e5d3b2..110a6fe 100644 --- a/rs_bindings_from_cc/src_code_gen.rs +++ b/rs_bindings_from_cc/src_code_gen.rs
@@ -323,7 +323,7 @@ } Self::CtorNew(arg_types) => { let arg_types = format_tuple_except_singleton(arg_types); - quote! { ctor::CtorNew < #arg_types > }.to_tokens(tokens) + quote! { ::ctor::CtorNew < #arg_types > }.to_tokens(tokens) } } } @@ -743,9 +743,9 @@ // TODO(b/226447239): check for copy here and instead use copies in that case? quote! { let #thunk_vars = args; - ctor::FnCtor::new(move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| { + ::ctor::FnCtor::new(move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| { unsafe { - crate::detail::#thunk_ident(crate::rust_std::pin::Pin::into_inner_unchecked(dest) #( , #thunk_args )*); + crate::detail::#thunk_ident(::std::pin::Pin::into_inner_unchecked(dest) #( , #thunk_args )*); } }) } @@ -760,7 +760,7 @@ // reference fields). TODO(b/213243309): Double-check if // zero-initialization is desirable here. quote! { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::#thunk_ident( &mut tmp #( , #thunk_args )* ); tmp.assume_init() @@ -841,17 +841,17 @@ // This feature seems destined for stabilization, and makes the code // simpler. features.insert(make_rs_ident("type_alias_impl_trait")); - extra_body = quote! {type CtorType = impl ctor::Ctor<Output = Self>;}; + extra_body = quote! {type CtorType = impl ::ctor::Ctor<Output = Self>;}; if let [single_param] = params.as_slice() { extra_items = quote! { - impl #trait_generic_params ctor::CtorNew<(#single_param,)> for #record_name { + impl #trait_generic_params ::ctor::CtorNew<(#single_param,)> for #record_name { #extra_body #[inline (always)] fn ctor_new(args: (#single_param,)) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<#single_param>>::ctor_new(arg) + <Self as ::ctor::CtorNew<#single_param>>::ctor_new(arg) } } } @@ -1069,7 +1069,7 @@ /// specified number of bits, rounded up to the next multiple of 8. fn bit_padding(padding_size_in_bits: usize) -> TokenStream { let padding_size = Literal::usize_unsuffixed((padding_size_in_bits + 7) / 8); - quote! { [crate::rust_std::mem::MaybeUninit<u8>; #padding_size] } + quote! { [::std::mem::MaybeUninit<u8>; #padding_size] } } /// Generates Rust source code for a given `Record` and associated assertions as @@ -1229,7 +1229,7 @@ // if we can ask Rust to preserve field destruction order if the // destructor is the SpecialMemberFunc::NontrivialMembers // case. - formatted = quote! { crate::rust_std::mem::ManuallyDrop<#formatted> } + formatted = quote! { ::std::mem::ManuallyDrop<#formatted> } } else { field_copy_trait_assertions.push(quote! { const _: () = { @@ -1310,9 +1310,9 @@ // blanket impl that requires Unpin doesn't apply. See http://<internal link>=h.f6jp8ifzgt3n record_features.insert(make_rs_ident("negative_impls")); if should_implement_drop(record) { - quote! {#[ctor::recursively_pinned(PinnedDrop)]} + quote! {#[::ctor::recursively_pinned(PinnedDrop)]} } else { - quote! {#[ctor::recursively_pinned]} + quote! {#[::ctor::recursively_pinned]} } }; @@ -1347,7 +1347,7 @@ let head_padding = if head_padding > 0 || !allow_direct_init { let n = proc_macro2::Literal::usize_unsuffixed(head_padding); quote! { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; #n], + __non_field_data: [::std::mem::MaybeUninit<u8>; #n], } } else { quote! {} @@ -1436,8 +1436,8 @@ assertions }; let assertion_tokens = quote! { - const _: () = assert!(rust_std::mem::size_of::<#qualified_ident>() == #size); - const _: () = assert!(rust_std::mem::align_of::<#qualified_ident>() == #alignment); + const _: () = assert!(::std::mem::size_of::<#qualified_ident>() == #size); + const _: () = assert!(::std::mem::align_of::<#qualified_ident>() == #alignment); #( #record_trait_assertions )* #( #field_offset_assertions )* #( #field_copy_trait_assertions )* @@ -1745,7 +1745,7 @@ // assumption to make, but to provide some safeguard, assert that // `Option<&i32>` and `&i32` have the same size. assertions.push(quote! { - const _: () = assert!(rust_std::mem::size_of::<Option<&i32>>() == rust_std::mem::size_of::<&i32>()); + const _: () = assert!(::std::mem::size_of::<Option<&i32>>() == ::std::mem::size_of::<&i32>()); }); // TODO(jeanpierreda): Delete has_record, either in favor of using RsSnippet, or not @@ -1787,18 +1787,6 @@ } }; - // TODO(b/227790881): Replace usage of rust_std with ::std once the issue - // is fixed. - let imports = if has_record { - quote! { - use ::std as rust_std; - } - } else { - quote! { - use ::std as rust_std; - } - }; - let features = if features.is_empty() { quote! {} } else { @@ -1815,8 +1803,6 @@ #![allow(non_upper_case_globals)] __NEWLINE__ #![deny(warnings)] __NEWLINE__ __NEWLINE__ - #imports __NEWLINE__ __NEWLINE__ - #( #items __NEWLINE__ __NEWLINE__ )* #mod_detail __NEWLINE__ __NEWLINE__ @@ -2074,7 +2060,7 @@ pub fn format_mut_ref_as_uninitialized(&self) -> Result<TokenStream> { match self { RsTypeKind::Reference { referent, lifetime, mutability: Mutability::Mut } => { - Ok(quote! { & #lifetime mut crate::rust_std::mem::MaybeUninit< #referent > }) + Ok(quote! { & #lifetime mut ::std::mem::MaybeUninit< #referent > }) } _ => bail!("Expected reference to format as MaybeUninit, got: {:?}", self), } @@ -2109,9 +2095,9 @@ } let mut_ = mutability.format_for_reference(); if mutability == &Mutability::Mut && !referent.is_unpin() { - // TODO(b/200067242): Add a `use rust_std::pin::Pin` to the crate, and use + // TODO(b/200067242): Add a `use ::std::pin::Pin` to the crate, and use // `Pin`. - Ok(quote! {self: crate::rust_std::pin::Pin< & #lifetime #mut_ Self>}) + Ok(quote! {self: ::std::pin::Pin< & #lifetime #mut_ Self>}) } else { Ok(quote! { & #lifetime #mut_ self }) } @@ -2201,21 +2187,21 @@ let mut_ = mutability.format_for_reference(); let reference = quote! {& #lifetime #mut_ #referent}; if mutability == &Mutability::Mut && !referent.is_unpin() { - // TODO(b/200067242): Add a `use rust_std::pin::Pin` to the crate, and use + // TODO(b/200067242): Add a `use ::std::pin::Pin` to the crate, and use // `Pin`. This either requires deciding how to qualify pin at // RsTypeKind-creation time, or returning an RsSnippet from here (and not // implementing ToTokens, but instead some other interface.) - quote! {crate::rust_std::pin::Pin< #reference >} + quote! {::std::pin::Pin< #reference >} } else { reference } } RsTypeKind::RvalueReference { referent, mutability, lifetime } => { - // TODO(b/200067242): Add a `use ctor::RvalueReference` (etc.) to the crate. + // TODO(b/200067242): Add a `use ::ctor::RvalueReference` (etc.) to the crate. if mutability == &Mutability::Mut { - quote! {ctor::RvalueReference<#lifetime, #referent>} + quote! {::ctor::RvalueReference<#lifetime, #referent>} } else { - quote! {ctor::ConstRvalueReference<#lifetime, #referent>} + quote! {::ctor::ConstRvalueReference<#lifetime, #referent>} } } RsTypeKind::FuncPtr { abi, return_type, param_types } => { @@ -3016,21 +3002,21 @@ #[derive(Clone, Copy)] #[repr(C, align(4))] pub struct SomeStruct { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 0], + __non_field_data: [::std::mem::MaybeUninit<u8>; 0], pub public_int: i32, #[doc = " Reason for representing this field as a blob of bytes:\n Types of non-public C++ fields can be elided away"] - pub(crate) protected_int: [crate::rust_std::mem::MaybeUninit<u8>; 4], + pub(crate) protected_int: [::std::mem::MaybeUninit<u8>; 4], #[doc = " Reason for representing this field as a blob of bytes:\n Types of non-public C++ fields can be elided away"] - pub(crate) private_int: [crate::rust_std::mem::MaybeUninit<u8>; 4], + pub(crate) private_int: [::std::mem::MaybeUninit<u8>; 4], } } ); assert_rs_matches!( rs_api, quote! { - const _: () = assert!(rust_std::mem::size_of::<Option<&i32>>() == rust_std::mem::size_of::<&i32>()); - const _: () = assert!(rust_std::mem::size_of::<crate::SomeStruct>() == 12); - const _: () = assert!(rust_std::mem::align_of::<crate::SomeStruct>() == 4); + const _: () = assert!(::std::mem::size_of::<Option<&i32>>() == ::std::mem::size_of::<&i32>()); + const _: () = assert!(::std::mem::size_of::<crate::SomeStruct>() == 12); + const _: () = assert!(::std::mem::align_of::<crate::SomeStruct>() == 4); const _: () = { static_assertions::assert_impl_all!(crate::SomeStruct: Clone); }; const _: () = { static_assertions::assert_impl_all!(crate::SomeStruct: Copy); }; const _: () = { static_assertions::assert_not_impl_any!(crate::SomeStruct: Drop); }; @@ -3165,7 +3151,7 @@ #[repr(C, align(4))] pub struct StructWithUnsupportedField { #[doc = " Doc comment for `my_field`.\n \n Reason for representing this field as a blob of bytes:\n Unsupported type 'struct StructWithUnsupportedField::NestedStruct': No generated bindings found for 'NestedStruct'"] - pub(crate) my_field: [crate::rust_std::mem::MaybeUninit<u8>; 4], + pub(crate) my_field: [::std::mem::MaybeUninit<u8>; 4], } ... const _: () = assert!( @@ -3196,7 +3182,7 @@ #[repr(C)] pub struct SomeStruct { pub first_field: i32, ... - __bitfields1: [crate::rust_std::mem::MaybeUninit<u8>; 4], + __bitfields1: [::std::mem::MaybeUninit<u8>; 4], pub last_field: i32, } ... @@ -3245,9 +3231,9 @@ pub struct StructWithUnnamedMembers { pub first_field: i32, #[doc=" Reason for representing this field as a blob of bytes:\n Unsupported type 'struct StructWithUnnamedMembers::(anonymous at ir_from_cc_virtual_header.h:7:15)': No generated bindings found for ''"] - pub(crate) __unnamed_field1: [crate::rust_std::mem::MaybeUninit<u8>; 8], + pub(crate) __unnamed_field1: [::std::mem::MaybeUninit<u8>; 8], #[doc=" Reason for representing this field as a blob of bytes:\n Unsupported type 'union StructWithUnnamedMembers::(anonymous at ir_from_cc_virtual_header.h:11:15)': No generated bindings found for ''"] - pub(crate) __unnamed_field2: [crate::rust_std::mem::MaybeUninit<u8>; 4], + pub(crate) __unnamed_field2: [::std::mem::MaybeUninit<u8>; 4], pub last_field: i32, } ... @@ -3717,7 +3703,7 @@ quote! { #[repr(C, align(8))] pub struct Derived { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 10], + __non_field_data: [::std::mem::MaybeUninit<u8>; 10], pub z: i16, } } @@ -3742,7 +3728,7 @@ quote! { #[repr(C, align(8))] pub struct Derived { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 10], + __non_field_data: [::std::mem::MaybeUninit<u8>; 10], pub z: i16, } } @@ -3767,7 +3753,7 @@ quote! { #[repr(C, align(8))] pub struct Derived { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 10], + __non_field_data: [::std::mem::MaybeUninit<u8>; 10], pub z: i16, } } @@ -3791,7 +3777,7 @@ quote! { #[repr(C, align(8))] pub struct Derived { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 16], + __non_field_data: [::std::mem::MaybeUninit<u8>; 16], } } ); @@ -3812,7 +3798,7 @@ quote! { #[repr(C)] pub struct Derived { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 1], + __non_field_data: [::std::mem::MaybeUninit<u8>; 1], } } ); @@ -3838,7 +3824,7 @@ // Currently, our tests use C++14 instead of C++17. In C++14, `Derived` // is not an aggregate, because it has a base class. C++17 removed this // restriction, and allows aggregates to have base classes. - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 0], + __non_field_data: [::std::mem::MaybeUninit<u8>; 0], pub x: i16, } } @@ -3864,7 +3850,7 @@ rs_api, quote! { pub struct NonAggregate { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 0], + __non_field_data: [::std::mem::MaybeUninit<u8>; 0], pub x: i16, } } @@ -3894,8 +3880,8 @@ #[derive(Clone, Copy)] #[repr(C, align(8))] pub struct Struct { - pub(crate) field1: [crate::rust_std::mem::MaybeUninit<u8>; 8], - pub(crate) field2: [crate::rust_std::mem::MaybeUninit<u8>; 2], + pub(crate) field1: [::std::mem::MaybeUninit<u8>; 8], + pub(crate) field2: [::std::mem::MaybeUninit<u8>; 2], pub z: i16, } } @@ -3937,8 +3923,8 @@ #[derive(Clone, Copy)] #[repr(C, align(8))] pub struct Struct { - pub(crate) field1: [crate::rust_std::mem::MaybeUninit<u8>; 8], - pub(crate) field2: [crate::rust_std::mem::MaybeUninit<u8>; 8], + pub(crate) field1: [::std::mem::MaybeUninit<u8>; 8], + pub(crate) field2: [::std::mem::MaybeUninit<u8>; 8], } } ); @@ -3962,7 +3948,7 @@ quote! { #[repr(C, align(4))] pub struct Struct { - pub(crate) field: [crate::rust_std::mem::MaybeUninit<u8>; 0], + pub(crate) field: [::std::mem::MaybeUninit<u8>; 0], pub x: i32, } } @@ -3986,7 +3972,7 @@ quote! { #[repr(C)] pub struct Struct { - pub(crate) field: [crate::rust_std::mem::MaybeUninit<u8>; 1], + pub(crate) field: [::std::mem::MaybeUninit<u8>; 1], } } ); @@ -4303,7 +4289,7 @@ quote! { #[repr(C, align(4))] pub union MyUnion { ... - first_field: [crate::rust_std::mem::MaybeUninit<u8>; 56], + first_field: [::std::mem::MaybeUninit<u8>; 56], pub second_field: i32, } } @@ -4311,11 +4297,11 @@ assert_rs_matches!( rs_api, - quote! { const _: () = assert!(rust_std::mem::size_of::<crate::MyUnion>() == 56); } + quote! { const _: () = assert!(::std::mem::size_of::<crate::MyUnion>() == 56); } ); assert_rs_matches!( rs_api, - quote! { const _: () = assert!(rust_std::mem::align_of::<crate::MyUnion>() == 4); } + quote! { const _: () = assert!(::std::mem::align_of::<crate::MyUnion>() == 4); } ); Ok(()) } @@ -4360,7 +4346,7 @@ pub union SomeUnionWithPrivateFields { pub public_field: i32, #[doc = " Reason for representing this field as a blob of bytes:\n Types of non-public C++ fields can be elided away"] - pub(crate) private_field: [crate::rust_std::mem::MaybeUninit<u8>; 8], + pub(crate) private_field: [::std::mem::MaybeUninit<u8>; 8], } } ); @@ -4368,8 +4354,8 @@ assert_rs_matches!( rs_api, quote! { - const _: () = assert!(rust_std::mem::size_of::<crate::SomeUnionWithPrivateFields>() == 8); - const _: () = assert!(rust_std::mem::align_of::<crate::SomeUnionWithPrivateFields>() == 8); + const _: () = assert!(::std::mem::size_of::<crate::SomeUnionWithPrivateFields>() == 8); + const _: () = assert!(::std::mem::align_of::<crate::SomeUnionWithPrivateFields>() == 8); const _: () = { static_assertions::assert_impl_all!(crate::SomeUnionWithPrivateFields: Clone); }; @@ -4405,7 +4391,7 @@ assert_rs_matches!( rs_api, quote! { - #[ctor::recursively_pinned] + #[::ctor::recursively_pinned] #[repr(C)] pub union UnionWithNontrivialField { ... } } @@ -4428,7 +4414,7 @@ #[derive(Clone, Copy)] #[repr(C)] pub struct EmptyStruct { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 1], + __non_field_data: [::std::mem::MaybeUninit<u8>; 1], } } ); @@ -4436,8 +4422,8 @@ assert_rs_matches!( rs_api, quote! { - const _: () = assert!(rust_std::mem::size_of::<crate::EmptyStruct>() == 1); - const _: () = assert!(rust_std::mem::align_of::<crate::EmptyStruct>() == 1); + const _: () = assert!(::std::mem::size_of::<crate::EmptyStruct>() == 1); + const _: () = assert!(::std::mem::align_of::<crate::EmptyStruct>() == 1); } ); @@ -4459,7 +4445,7 @@ #[derive(Clone, Copy)] #[repr(C)] pub union EmptyUnion { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 1], + __non_field_data: [::std::mem::MaybeUninit<u8>; 1], } } ); @@ -4467,8 +4453,8 @@ assert_rs_matches!( rs_api, quote! { - const _: () = assert!(rust_std::mem::size_of::<crate::EmptyUnion>() == 1); - const _: () = assert!(rust_std::mem::align_of::<crate::EmptyUnion>() == 1); + const _: () = assert!(::std::mem::size_of::<crate::EmptyUnion>() == 1); + const _: () = assert!(::std::mem::align_of::<crate::EmptyUnion>() == 1); } ); @@ -4494,7 +4480,7 @@ #[repr(C)] pub union UnionWithNontrivialField { pub trivial_field: i32, - pub nontrivial_field: crate::rust_std::mem::ManuallyDrop<crate::NontrivialStruct>, + pub nontrivial_field: ::std::mem::ManuallyDrop<crate::NontrivialStruct>, } } ); @@ -4502,8 +4488,8 @@ assert_rs_matches!( rs_api, quote! { - const _: () = assert!(rust_std::mem::size_of::<crate::UnionWithNontrivialField>() == 4); - const _: () = assert!(rust_std::mem::align_of::<crate::UnionWithNontrivialField>() == 4); + const _: () = assert!(::std::mem::size_of::<crate::UnionWithNontrivialField>() == 4); + const _: () = assert!(::std::mem::align_of::<crate::UnionWithNontrivialField>() == 4); } ); Ok(()) @@ -4538,7 +4524,7 @@ impl Default for UnionWithDefaultConstructors { #[inline(always)] fn default() -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN28UnionWithDefaultConstructorsC1Ev(&mut tmp); tmp.assume_init() @@ -4551,10 +4537,10 @@ assert_rs_matches!( rs_api, quote! { - impl<'b> From<ctor::RvalueReference<'b, crate::UnionWithDefaultConstructors>> for UnionWithDefaultConstructors { + impl<'b> From<::ctor::RvalueReference<'b, crate::UnionWithDefaultConstructors>> for UnionWithDefaultConstructors { #[inline(always)] - fn from(__param_0: ctor::RvalueReference<'b, crate::UnionWithDefaultConstructors>) -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + fn from(__param_0: ::ctor::RvalueReference<'b, crate::UnionWithDefaultConstructors>) -> Self { + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN28UnionWithDefaultConstructorsC1EOS_(&mut tmp, __param_0); tmp.assume_init() @@ -4727,7 +4713,7 @@ fn test_no_negative_impl_unpin() -> Result<()> { let ir = ir_from_cc("struct Trivial final {};")?; let rs_api = generate_bindings_tokens(ir)?.rs_api; - assert_rs_not_matches!(rs_api, quote! {#[ctor::recursively_pinned]}); + assert_rs_not_matches!(rs_api, quote! {#[::ctor::recursively_pinned]}); Ok(()) } @@ -4737,7 +4723,7 @@ fn test_negative_impl_unpin_nonfinal() -> Result<()> { let ir = ir_from_cc("struct Nonfinal {};")?; let rs_api = generate_bindings_tokens(ir)?.rs_api; - assert_rs_matches!(rs_api, quote! {#[ctor::recursively_pinned]}); + assert_rs_matches!(rs_api, quote! {#[::ctor::recursively_pinned]}); Ok(()) } @@ -4770,7 +4756,7 @@ quote! { impl ::ctor::PinnedDrop for UserDefinedDestructor { #[inline(always)] - unsafe fn pinned_drop<'a>(self: crate::rust_std::pin::Pin<&'a mut Self>) { + unsafe fn pinned_drop<'a>(self: ::std::pin::Pin<&'a mut Self>) { crate::detail::__rust_thunk___ZN21UserDefinedDestructorD1Ev(self) } } @@ -4779,7 +4765,7 @@ assert_rs_matches!(rs_api, quote! {pub x: i32,}); assert_rs_matches!( rs_api, - quote! {pub nts: crate::rust_std::mem::ManuallyDrop<crate::NontrivialStruct>,} + quote! {pub nts: ::std::mem::ManuallyDrop<crate::NontrivialStruct>,} ); Ok(()) } @@ -4808,7 +4794,7 @@ quote! { impl ::ctor::PinnedDrop for NontrivialMembers { #[inline(always)] - unsafe fn pinned_drop<'a>(self: crate::rust_std::pin::Pin<&'a mut Self>) { + unsafe fn pinned_drop<'a>(self: ::std::pin::Pin<&'a mut Self>) { crate::detail::__rust_thunk___ZN17NontrivialMembersD1Ev(self) } } @@ -4818,7 +4804,7 @@ assert_rs_matches!(rs_api, quote! {pub ts: crate::TrivialStruct,}); assert_rs_matches!( rs_api, - quote! {pub udd: crate::rust_std::mem::ManuallyDrop<crate::UserDefinedDestructor>,} + quote! {pub udd: ::std::mem::ManuallyDrop<crate::UserDefinedDestructor>,} ); Ok(()) } @@ -4858,7 +4844,7 @@ impl Default for DefaultedConstructor { #[inline(always)] fn default() -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN20DefaultedConstructorC1Ev(&mut tmp); tmp.assume_init() @@ -4974,7 +4960,7 @@ impl From<i32> for SomeStruct { #[inline(always)] fn from(i: i32) -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN10SomeStructC1Ei(&mut tmp, i); tmp.assume_init() @@ -5005,7 +4991,7 @@ impl<'b> From<&'b crate::SomeOtherStruct> for StructUnderTest { #[inline(always)] fn from(other: &'b crate::SomeOtherStruct) -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN15StructUnderTestC1ERK15SomeOtherStruct( &mut tmp, other); @@ -5109,7 +5095,7 @@ quote! { impl<'b> ::ctor::Assign<&'b crate::SomeStruct> for SomeStruct { #[inline(always)] - fn assign<'a>(self: crate::rust_std::pin::Pin<&'a mut Self>, other: &'b crate::SomeStruct) { + fn assign<'a>(self: ::std::pin::Pin<&'a mut Self>, other: &'b crate::SomeStruct) { unsafe { crate::detail::__rust_thunk___ZN10SomeStructaSERKS_(self, other); } @@ -5135,7 +5121,7 @@ quote! { impl<'b> ::ctor::Assign<&'b crate::SomeStruct> for SomeStruct { #[inline(always)] - fn assign<'a>(self: crate::rust_std::pin::Pin<&'a mut Self>, __param_0: &'b crate::SomeStruct) { + fn assign<'a>(self: ::std::pin::Pin<&'a mut Self>, __param_0: &'b crate::SomeStruct) { unsafe { crate::detail::__rust_thunk___ZN10SomeStructaSERKS_(self, __param_0); } @@ -5161,7 +5147,7 @@ quote! { impl<'b> ::ctor::Assign<&'b crate::SomeStruct> for SomeStruct { #[inline(always)] - fn assign<'a>(self: crate::rust_std::pin::Pin<&'a mut Self>, other: &'b crate::SomeStruct) { + fn assign<'a>(self: ::std::pin::Pin<&'a mut Self>, other: &'b crate::SomeStruct) { unsafe { crate::detail::__rust_thunk___ZN10SomeStructaSERKS_(self, other); } @@ -5679,7 +5665,7 @@ assert_rs_matches!( rs_api, quote! { - fn Function<'a>(s: crate::rust_std::pin::Pin<&'a mut crate::S>) { ... } + fn Function<'a>(s: ::std::pin::Pin<&'a mut crate::S>) { ... } } ); Ok(()) @@ -5723,7 +5709,7 @@ assert_rs_matches!( rs_api, quote! { - fn Function<'a>(self: crate::rust_std::pin::Pin<&'a mut Self>) { ... } + fn Function<'a>(self: ::std::pin::Pin<&'a mut Self>) { ... } } ); Ok(()) @@ -5741,7 +5727,7 @@ assert_rs_matches!( rs_api, quote! { - unsafe fn pinned_drop<'a>(self: crate::rust_std::pin::Pin<&'a mut Self>) { ... } + unsafe fn pinned_drop<'a>(self: ::std::pin::Pin<&'a mut Self>) { ... } } ); Ok(()) @@ -5755,19 +5741,19 @@ struct HasConstructor {explicit HasConstructor() {}};"#, )?; let rs_api = generate_bindings_tokens(ir)?.rs_api; - assert_rs_matches!(rs_api, quote! {#[ctor::recursively_pinned]}); + assert_rs_matches!(rs_api, quote! {#[::ctor::recursively_pinned]}); assert_rs_matches!( rs_api, quote! { - impl ctor::CtorNew<()> for HasConstructor { - type CtorType = impl ctor::Ctor<Output = Self>; + impl ::ctor::CtorNew<()> for HasConstructor { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline (always)] fn ctor_new(args: ()) -> Self::CtorType { let () = args; - ctor::FnCtor::new(move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| { + ::ctor::FnCtor::new(move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| { unsafe { - crate::detail::__rust_thunk___ZN14HasConstructorC1Ev(crate::rust_std::pin::Pin::into_inner_unchecked(dest)); + crate::detail::__rust_thunk___ZN14HasConstructorC1Ev(::std::pin::Pin::into_inner_unchecked(dest)); } }) } @@ -5785,19 +5771,19 @@ struct HasConstructor {explicit HasConstructor(unsigned char input) {}};"#, )?; let rs_api = generate_bindings_tokens(ir)?.rs_api; - assert_rs_matches!(rs_api, quote! {#[ctor::recursively_pinned]}); + assert_rs_matches!(rs_api, quote! {#[::ctor::recursively_pinned]}); assert_rs_matches!( rs_api, quote! { - impl ctor::CtorNew<u8> for HasConstructor { - type CtorType = impl ctor::Ctor<Output = Self>; + impl ::ctor::CtorNew<u8> for HasConstructor { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline (always)] fn ctor_new(args: u8) -> Self::CtorType { let input = args; - ctor::FnCtor::new(move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| { + ::ctor::FnCtor::new(move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| { unsafe { - crate::detail::__rust_thunk___ZN14HasConstructorC1Eh(crate::rust_std::pin::Pin::into_inner_unchecked(dest), input); + crate::detail::__rust_thunk___ZN14HasConstructorC1Eh(::std::pin::Pin::into_inner_unchecked(dest), input); } }) } @@ -5815,19 +5801,19 @@ struct HasConstructor {explicit HasConstructor(unsigned char input1, signed char input2) {}};"#, )?; let rs_api = generate_bindings_tokens(ir)?.rs_api; - assert_rs_matches!(rs_api, quote! {#[ctor::recursively_pinned]}); + assert_rs_matches!(rs_api, quote! {#[::ctor::recursively_pinned]}); assert_rs_matches!( rs_api, quote! { - impl ctor::CtorNew<(u8, i8)> for HasConstructor { - type CtorType = impl ctor::Ctor<Output = Self>; + impl ::ctor::CtorNew<(u8, i8)> for HasConstructor { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline (always)] fn ctor_new(args: (u8, i8)) -> Self::CtorType { let (input1, input2) = args; - ctor::FnCtor::new(move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| { + ::ctor::FnCtor::new(move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| { unsafe { - crate::detail::__rust_thunk___ZN14HasConstructorC1Eha(crate::rust_std::pin::Pin::into_inner_unchecked(dest), input1, input2); + crate::detail::__rust_thunk___ZN14HasConstructorC1Eha(::std::pin::Pin::into_inner_unchecked(dest), input1, input2); } }) } @@ -5942,8 +5928,8 @@ ... } ... - const _: () = assert!(rust_std::mem::size_of::<crate::test_namespace_bindings::S>() == 4); - const _: () = assert!(rust_std::mem::align_of::<crate::test_namespace_bindings::S>() == 4); + const _: () = assert!(::std::mem::size_of::<crate::test_namespace_bindings::S>() == 4); + const _: () = assert!(::std::mem::align_of::<crate::test_namespace_bindings::S>() == 4); ... const _: () = assert!(memoffset_unstable_const::offset_of!(crate::test_namespace_bindings::S, i) == 0); } @@ -6090,11 +6076,11 @@ ... pub struct #my_struct_int {...} ... - const _: () = assert!(rust_std::mem::size_of::<crate::#my_struct_bool>() == 1); + const _: () = assert!(::std::mem::size_of::<crate::#my_struct_bool>() == 1); ... - const _: () = assert!(rust_std::mem::size_of::<crate::#my_struct_double>() == 1); + const _: () = assert!(::std::mem::size_of::<crate::#my_struct_double>() == 1); ... - const _: () = assert!(rust_std::mem::size_of::<crate::#my_struct_int>() == 1); + const _: () = assert!(::std::mem::size_of::<crate::#my_struct_int>() == 1); ... } );
diff --git a/rs_bindings_from_cc/test/golden/bitfields_rs_api.rs b/rs_bindings_from_cc/test/golden/bitfields_rs_api.rs index e153b47..d6dee61 100644 --- a/rs_bindings_from_cc/test/golden/bitfields_rs_api.rs +++ b/rs_bindings_from_cc/test/golden/bitfields_rs_api.rs
@@ -11,28 +11,26 @@ #![allow(non_upper_case_globals)] #![deny(warnings)] -use ::std as rust_std; - // Part of the Crubit project, under the Apache License v2.0 with LLVM // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#[ctor::recursively_pinned] +#[::ctor::recursively_pinned] #[repr(C, align(4))] pub struct WithBitfields { // f1 : 2 bits - __bitfields0: [crate::rust_std::mem::MaybeUninit<u8>; 1], + __bitfields0: [::std::mem::MaybeUninit<u8>; 1], pub f2: i32, // f3 : 4 bits // f4 : 8 bits // : 45 bits - __bitfields2: [crate::rust_std::mem::MaybeUninit<u8>; 10], + __bitfields2: [::std::mem::MaybeUninit<u8>; 10], pub f5: i32, // f6 : 23 bits - __bitfields4: [crate::rust_std::mem::MaybeUninit<u8>; 3], - pub(crate) f7: [crate::rust_std::mem::MaybeUninit<u8>; 1], + __bitfields4: [::std::mem::MaybeUninit<u8>; 3], + pub(crate) f7: [::std::mem::MaybeUninit<u8>; 1], // f8 : 2 bits - __bitfields6: [crate::rust_std::mem::MaybeUninit<u8>; 1], + __bitfields6: [::std::mem::MaybeUninit<u8>; 1], } forward_declare::unsafe_define!(forward_declare::symbol!("WithBitfields"), crate::WithBitfields); impl WithBitfields { @@ -41,86 +39,83 @@ } } -impl ctor::CtorNew<()> for WithBitfields { - type CtorType = impl ctor::Ctor<Output = Self>; +impl ::ctor::CtorNew<()> for WithBitfields { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: ()) -> Self::CtorType { let () = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN13WithBitfieldsC1Ev( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), ); }, ) } } -impl<'b> ctor::CtorNew<&'b crate::WithBitfields> for WithBitfields { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<&'b crate::WithBitfields> for WithBitfields { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: &'b crate::WithBitfields) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN13WithBitfieldsC1ERKS_( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), __param_0, ); }, ) } } -impl<'b> ctor::CtorNew<(&'b crate::WithBitfields,)> for WithBitfields { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<(&'b crate::WithBitfields,)> for WithBitfields { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: (&'b crate::WithBitfields,)) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<&'b crate::WithBitfields>>::ctor_new(arg) + <Self as ::ctor::CtorNew<&'b crate::WithBitfields>>::ctor_new(arg) } } -impl<'b> ctor::CtorNew<ctor::RvalueReference<'b, crate::WithBitfields>> for WithBitfields { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<::ctor::RvalueReference<'b, crate::WithBitfields>> for WithBitfields { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] - fn ctor_new(args: ctor::RvalueReference<'b, crate::WithBitfields>) -> Self::CtorType { + fn ctor_new(args: ::ctor::RvalueReference<'b, crate::WithBitfields>) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN13WithBitfieldsC1EOS_( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), __param_0, ); }, ) } } -impl<'b> ctor::CtorNew<(ctor::RvalueReference<'b, crate::WithBitfields>,)> for WithBitfields { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<(::ctor::RvalueReference<'b, crate::WithBitfields>,)> for WithBitfields { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] - fn ctor_new(args: (ctor::RvalueReference<'b, crate::WithBitfields>,)) -> Self::CtorType { + fn ctor_new(args: (::ctor::RvalueReference<'b, crate::WithBitfields>,)) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<ctor::RvalueReference<'b, crate::WithBitfields>>>::ctor_new(arg) + <Self as ::ctor::CtorNew<::ctor::RvalueReference<'b, crate::WithBitfields>>>::ctor_new(arg) } } impl<'b> ::ctor::Assign<&'b crate::WithBitfields> for WithBitfields { #[inline(always)] - fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, - __param_0: &'b crate::WithBitfields, - ) { + fn assign<'a>(self: ::std::pin::Pin<&'a mut Self>, __param_0: &'b crate::WithBitfields) { unsafe { crate::detail::__rust_thunk___ZN13WithBitfieldsaSERKS_(self, __param_0); } } } -impl<'b> ::ctor::Assign<ctor::RvalueReference<'b, crate::WithBitfields>> for WithBitfields { +impl<'b> ::ctor::Assign<::ctor::RvalueReference<'b, crate::WithBitfields>> for WithBitfields { #[inline(always)] fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, - __param_0: ctor::RvalueReference<'b, crate::WithBitfields>, + self: ::std::pin::Pin<&'a mut Self>, + __param_0: ::ctor::RvalueReference<'b, crate::WithBitfields>, ) { unsafe { crate::detail::__rust_thunk___ZN13WithBitfieldsaSEOS_(self, __param_0); @@ -135,31 +130,31 @@ use super::*; extern "C" { pub(crate) fn __rust_thunk___ZN13WithBitfieldsC1Ev<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::WithBitfields>, + __this: &'a mut ::std::mem::MaybeUninit<crate::WithBitfields>, ); pub(crate) fn __rust_thunk___ZN13WithBitfieldsC1ERKS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::WithBitfields>, + __this: &'a mut ::std::mem::MaybeUninit<crate::WithBitfields>, __param_0: &'b crate::WithBitfields, ); pub(crate) fn __rust_thunk___ZN13WithBitfieldsC1EOS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::WithBitfields>, - __param_0: ctor::RvalueReference<'b, crate::WithBitfields>, + __this: &'a mut ::std::mem::MaybeUninit<crate::WithBitfields>, + __param_0: ::ctor::RvalueReference<'b, crate::WithBitfields>, ); pub(crate) fn __rust_thunk___ZN13WithBitfieldsaSERKS_<'a, 'b>( - __this: crate::rust_std::pin::Pin<&'a mut crate::WithBitfields>, + __this: ::std::pin::Pin<&'a mut crate::WithBitfields>, __param_0: &'b crate::WithBitfields, - ) -> crate::rust_std::pin::Pin<&'a mut crate::WithBitfields>; + ) -> ::std::pin::Pin<&'a mut crate::WithBitfields>; pub(crate) fn __rust_thunk___ZN13WithBitfieldsaSEOS_<'a, 'b>( - __this: crate::rust_std::pin::Pin<&'a mut crate::WithBitfields>, - __param_0: ctor::RvalueReference<'b, crate::WithBitfields>, - ) -> crate::rust_std::pin::Pin<&'a mut crate::WithBitfields>; + __this: ::std::pin::Pin<&'a mut crate::WithBitfields>, + __param_0: ::ctor::RvalueReference<'b, crate::WithBitfields>, + ) -> ::std::pin::Pin<&'a mut crate::WithBitfields>; } } -const _: () = assert!(rust_std::mem::size_of::<Option<&i32>>() == rust_std::mem::size_of::<&i32>()); +const _: () = assert!(::std::mem::size_of::<Option<&i32>>() == ::std::mem::size_of::<&i32>()); -const _: () = assert!(rust_std::mem::size_of::<crate::WithBitfields>() == 32); -const _: () = assert!(rust_std::mem::align_of::<crate::WithBitfields>() == 4); +const _: () = assert!(::std::mem::size_of::<crate::WithBitfields>() == 32); +const _: () = assert!(::std::mem::align_of::<crate::WithBitfields>() == 4); const _: () = { static_assertions::assert_not_impl_any!(crate::WithBitfields: Copy); };
diff --git a/rs_bindings_from_cc/test/golden/clang_attrs_rs_api.rs b/rs_bindings_from_cc/test/golden/clang_attrs_rs_api.rs index 07aa4d5..17e61dc 100644 --- a/rs_bindings_from_cc/test/golden/clang_attrs_rs_api.rs +++ b/rs_bindings_from_cc/test/golden/clang_attrs_rs_api.rs
@@ -11,108 +11,105 @@ #![allow(non_upper_case_globals)] #![deny(warnings)] -use ::std as rust_std; - // Part of the Crubit project, under the Apache License v2.0 with LLVM // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#[ctor::recursively_pinned] +#[::ctor::recursively_pinned] #[repr(C, align(64))] pub struct HasCustomAlignment { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 64], + __non_field_data: [::std::mem::MaybeUninit<u8>; 64], } forward_declare::unsafe_define!( forward_declare::symbol!("HasCustomAlignment"), crate::HasCustomAlignment ); -impl ctor::CtorNew<()> for HasCustomAlignment { - type CtorType = impl ctor::Ctor<Output = Self>; +impl ::ctor::CtorNew<()> for HasCustomAlignment { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: ()) -> Self::CtorType { let () = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN18HasCustomAlignmentC1Ev( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), ); }, ) } } -impl<'b> ctor::CtorNew<&'b crate::HasCustomAlignment> for HasCustomAlignment { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<&'b crate::HasCustomAlignment> for HasCustomAlignment { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: &'b crate::HasCustomAlignment) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN18HasCustomAlignmentC1ERKS_( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), __param_0, ); }, ) } } -impl<'b> ctor::CtorNew<(&'b crate::HasCustomAlignment,)> for HasCustomAlignment { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<(&'b crate::HasCustomAlignment,)> for HasCustomAlignment { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: (&'b crate::HasCustomAlignment,)) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<&'b crate::HasCustomAlignment>>::ctor_new(arg) + <Self as ::ctor::CtorNew<&'b crate::HasCustomAlignment>>::ctor_new(arg) } } -impl<'b> ctor::CtorNew<ctor::RvalueReference<'b, crate::HasCustomAlignment>> +impl<'b> ::ctor::CtorNew<::ctor::RvalueReference<'b, crate::HasCustomAlignment>> for HasCustomAlignment { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] - fn ctor_new(args: ctor::RvalueReference<'b, crate::HasCustomAlignment>) -> Self::CtorType { + fn ctor_new(args: ::ctor::RvalueReference<'b, crate::HasCustomAlignment>) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN18HasCustomAlignmentC1EOS_( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), __param_0, ); }, ) } } -impl<'b> ctor::CtorNew<(ctor::RvalueReference<'b, crate::HasCustomAlignment>,)> +impl<'b> ::ctor::CtorNew<(::ctor::RvalueReference<'b, crate::HasCustomAlignment>,)> for HasCustomAlignment { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] - fn ctor_new(args: (ctor::RvalueReference<'b, crate::HasCustomAlignment>,)) -> Self::CtorType { + fn ctor_new(args: (::ctor::RvalueReference<'b, crate::HasCustomAlignment>,)) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<ctor::RvalueReference<'b, crate::HasCustomAlignment>>>::ctor_new(arg) + <Self as ::ctor::CtorNew<::ctor::RvalueReference<'b, crate::HasCustomAlignment>>>::ctor_new( + arg, + ) } } impl<'b> ::ctor::Assign<&'b crate::HasCustomAlignment> for HasCustomAlignment { #[inline(always)] - fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, - __param_0: &'b crate::HasCustomAlignment, - ) { + fn assign<'a>(self: ::std::pin::Pin<&'a mut Self>, __param_0: &'b crate::HasCustomAlignment) { unsafe { crate::detail::__rust_thunk___ZN18HasCustomAlignmentaSERKS_(self, __param_0); } } } -impl<'b> ::ctor::Assign<ctor::RvalueReference<'b, crate::HasCustomAlignment>> +impl<'b> ::ctor::Assign<::ctor::RvalueReference<'b, crate::HasCustomAlignment>> for HasCustomAlignment { #[inline(always)] fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, - __param_0: ctor::RvalueReference<'b, crate::HasCustomAlignment>, + self: ::std::pin::Pin<&'a mut Self>, + __param_0: ::ctor::RvalueReference<'b, crate::HasCustomAlignment>, ) { unsafe { crate::detail::__rust_thunk___ZN18HasCustomAlignmentaSEOS_(self, __param_0); @@ -120,7 +117,7 @@ } } -#[ctor::recursively_pinned] +#[::ctor::recursively_pinned] #[repr(C)] pub struct HasFieldWithCustomAlignment { pub field: crate::HasCustomAlignment, @@ -130,81 +127,83 @@ crate::HasFieldWithCustomAlignment ); -impl ctor::CtorNew<()> for HasFieldWithCustomAlignment { - type CtorType = impl ctor::Ctor<Output = Self>; +impl ::ctor::CtorNew<()> for HasFieldWithCustomAlignment { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: ()) -> Self::CtorType { let () = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN27HasFieldWithCustomAlignmentC1Ev( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), ); }, ) } } -impl<'b> ctor::CtorNew<&'b crate::HasFieldWithCustomAlignment> for HasFieldWithCustomAlignment { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<&'b crate::HasFieldWithCustomAlignment> for HasFieldWithCustomAlignment { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: &'b crate::HasFieldWithCustomAlignment) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN27HasFieldWithCustomAlignmentC1ERKS_( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), __param_0, ); }, ) } } -impl<'b> ctor::CtorNew<(&'b crate::HasFieldWithCustomAlignment,)> for HasFieldWithCustomAlignment { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<(&'b crate::HasFieldWithCustomAlignment,)> + for HasFieldWithCustomAlignment +{ + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: (&'b crate::HasFieldWithCustomAlignment,)) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<&'b crate::HasFieldWithCustomAlignment>>::ctor_new(arg) + <Self as ::ctor::CtorNew<&'b crate::HasFieldWithCustomAlignment>>::ctor_new(arg) } } -impl<'b> ctor::CtorNew<ctor::RvalueReference<'b, crate::HasFieldWithCustomAlignment>> +impl<'b> ::ctor::CtorNew<::ctor::RvalueReference<'b, crate::HasFieldWithCustomAlignment>> for HasFieldWithCustomAlignment { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new( - args: ctor::RvalueReference<'b, crate::HasFieldWithCustomAlignment>, + args: ::ctor::RvalueReference<'b, crate::HasFieldWithCustomAlignment>, ) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN27HasFieldWithCustomAlignmentC1EOS_( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), __param_0, ); }, ) } } -impl<'b> ctor::CtorNew<(ctor::RvalueReference<'b, crate::HasFieldWithCustomAlignment>,)> +impl<'b> ::ctor::CtorNew<(::ctor::RvalueReference<'b, crate::HasFieldWithCustomAlignment>,)> for HasFieldWithCustomAlignment { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new( - args: (ctor::RvalueReference<'b, crate::HasFieldWithCustomAlignment>,), + args: (::ctor::RvalueReference<'b, crate::HasFieldWithCustomAlignment>,), ) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<ctor::RvalueReference<'b,crate::HasFieldWithCustomAlignment>>>::ctor_new(arg) + <Self as::ctor::CtorNew<::ctor::RvalueReference<'b,crate::HasFieldWithCustomAlignment>>>::ctor_new(arg) } } impl<'b> ::ctor::Assign<&'b crate::HasFieldWithCustomAlignment> for HasFieldWithCustomAlignment { #[inline(always)] fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, + self: ::std::pin::Pin<&'a mut Self>, __param_0: &'b crate::HasFieldWithCustomAlignment, ) { unsafe { @@ -213,13 +212,13 @@ } } -impl<'b> ::ctor::Assign<ctor::RvalueReference<'b, crate::HasFieldWithCustomAlignment>> +impl<'b> ::ctor::Assign<::ctor::RvalueReference<'b, crate::HasFieldWithCustomAlignment>> for HasFieldWithCustomAlignment { #[inline(always)] fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, - __param_0: ctor::RvalueReference<'b, crate::HasFieldWithCustomAlignment>, + self: ::std::pin::Pin<&'a mut Self>, + __param_0: ::ctor::RvalueReference<'b, crate::HasFieldWithCustomAlignment>, ) { unsafe { crate::detail::__rust_thunk___ZN27HasFieldWithCustomAlignmentaSEOS_(self, __param_0); @@ -227,89 +226,89 @@ } } -#[ctor::recursively_pinned] +#[::ctor::recursively_pinned] #[repr(C, align(64))] pub struct InheritsFromBaseWithCustomAlignment { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 64], + __non_field_data: [::std::mem::MaybeUninit<u8>; 64], } forward_declare::unsafe_define!( forward_declare::symbol!("InheritsFromBaseWithCustomAlignment"), crate::InheritsFromBaseWithCustomAlignment ); -impl ctor::CtorNew<()> for InheritsFromBaseWithCustomAlignment { - type CtorType = impl ctor::Ctor<Output = Self>; +impl ::ctor::CtorNew<()> for InheritsFromBaseWithCustomAlignment { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: ()) -> Self::CtorType { let () = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN35InheritsFromBaseWithCustomAlignmentC1Ev( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), ); }, ) } } -impl<'b> ctor::CtorNew<&'b crate::InheritsFromBaseWithCustomAlignment> +impl<'b> ::ctor::CtorNew<&'b crate::InheritsFromBaseWithCustomAlignment> for InheritsFromBaseWithCustomAlignment { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: &'b crate::InheritsFromBaseWithCustomAlignment) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN35InheritsFromBaseWithCustomAlignmentC1ERKS_( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), __param_0, ); }, ) } } -impl<'b> ctor::CtorNew<(&'b crate::InheritsFromBaseWithCustomAlignment,)> +impl<'b> ::ctor::CtorNew<(&'b crate::InheritsFromBaseWithCustomAlignment,)> for InheritsFromBaseWithCustomAlignment { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: (&'b crate::InheritsFromBaseWithCustomAlignment,)) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<&'b crate::InheritsFromBaseWithCustomAlignment>>::ctor_new(arg) + <Self as ::ctor::CtorNew<&'b crate::InheritsFromBaseWithCustomAlignment>>::ctor_new(arg) } } -impl<'b> ctor::CtorNew<ctor::RvalueReference<'b, crate::InheritsFromBaseWithCustomAlignment>> +impl<'b> ::ctor::CtorNew<::ctor::RvalueReference<'b, crate::InheritsFromBaseWithCustomAlignment>> for InheritsFromBaseWithCustomAlignment { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new( - args: ctor::RvalueReference<'b, crate::InheritsFromBaseWithCustomAlignment>, + args: ::ctor::RvalueReference<'b, crate::InheritsFromBaseWithCustomAlignment>, ) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN35InheritsFromBaseWithCustomAlignmentC1EOS_( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), __param_0, ); }, ) } } -impl<'b> ctor::CtorNew<(ctor::RvalueReference<'b, crate::InheritsFromBaseWithCustomAlignment>,)> +impl<'b> ::ctor::CtorNew<(::ctor::RvalueReference<'b, crate::InheritsFromBaseWithCustomAlignment>,)> for InheritsFromBaseWithCustomAlignment { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new( - args: (ctor::RvalueReference<'b, crate::InheritsFromBaseWithCustomAlignment>,), + args: (::ctor::RvalueReference<'b, crate::InheritsFromBaseWithCustomAlignment>,), ) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew< - ctor::RvalueReference<'b, crate::InheritsFromBaseWithCustomAlignment>, + <Self as ::ctor::CtorNew< + ::ctor::RvalueReference<'b, crate::InheritsFromBaseWithCustomAlignment>, >>::ctor_new(arg) } } @@ -319,7 +318,7 @@ { #[inline(always)] fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, + self: ::std::pin::Pin<&'a mut Self>, __param_0: &'b crate::InheritsFromBaseWithCustomAlignment, ) { unsafe { @@ -330,13 +329,13 @@ } } -impl<'b> ::ctor::Assign<ctor::RvalueReference<'b, crate::InheritsFromBaseWithCustomAlignment>> +impl<'b> ::ctor::Assign<::ctor::RvalueReference<'b, crate::InheritsFromBaseWithCustomAlignment>> for InheritsFromBaseWithCustomAlignment { #[inline(always)] fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, - __param_0: ctor::RvalueReference<'b, crate::InheritsFromBaseWithCustomAlignment>, + self: ::std::pin::Pin<&'a mut Self>, + __param_0: ::ctor::RvalueReference<'b, crate::InheritsFromBaseWithCustomAlignment>, ) { unsafe { crate::detail::__rust_thunk___ZN35InheritsFromBaseWithCustomAlignmentaSEOS_( @@ -352,86 +351,90 @@ } } -#[ctor::recursively_pinned] +#[::ctor::recursively_pinned] #[repr(C, align(64))] pub struct HasCustomAlignmentWithGnuAttr { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 64], + __non_field_data: [::std::mem::MaybeUninit<u8>; 64], } forward_declare::unsafe_define!( forward_declare::symbol!("HasCustomAlignmentWithGnuAttr"), crate::HasCustomAlignmentWithGnuAttr ); -impl ctor::CtorNew<()> for HasCustomAlignmentWithGnuAttr { - type CtorType = impl ctor::Ctor<Output = Self>; +impl ::ctor::CtorNew<()> for HasCustomAlignmentWithGnuAttr { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: ()) -> Self::CtorType { let () = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN29HasCustomAlignmentWithGnuAttrC1Ev( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), ); }, ) } } -impl<'b> ctor::CtorNew<&'b crate::HasCustomAlignmentWithGnuAttr> for HasCustomAlignmentWithGnuAttr { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<&'b crate::HasCustomAlignmentWithGnuAttr> + for HasCustomAlignmentWithGnuAttr +{ + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: &'b crate::HasCustomAlignmentWithGnuAttr) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN29HasCustomAlignmentWithGnuAttrC1ERKS_( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), __param_0, ); }, ) } } -impl<'b> ctor::CtorNew<(&'b crate::HasCustomAlignmentWithGnuAttr,)> +impl<'b> ::ctor::CtorNew<(&'b crate::HasCustomAlignmentWithGnuAttr,)> for HasCustomAlignmentWithGnuAttr { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: (&'b crate::HasCustomAlignmentWithGnuAttr,)) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<&'b crate::HasCustomAlignmentWithGnuAttr>>::ctor_new(arg) + <Self as ::ctor::CtorNew<&'b crate::HasCustomAlignmentWithGnuAttr>>::ctor_new(arg) } } -impl<'b> ctor::CtorNew<ctor::RvalueReference<'b, crate::HasCustomAlignmentWithGnuAttr>> +impl<'b> ::ctor::CtorNew<::ctor::RvalueReference<'b, crate::HasCustomAlignmentWithGnuAttr>> for HasCustomAlignmentWithGnuAttr { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new( - args: ctor::RvalueReference<'b, crate::HasCustomAlignmentWithGnuAttr>, + args: ::ctor::RvalueReference<'b, crate::HasCustomAlignmentWithGnuAttr>, ) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN29HasCustomAlignmentWithGnuAttrC1EOS_( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), __param_0, ); }, ) } } -impl<'b> ctor::CtorNew<(ctor::RvalueReference<'b, crate::HasCustomAlignmentWithGnuAttr>,)> +impl<'b> ::ctor::CtorNew<(::ctor::RvalueReference<'b, crate::HasCustomAlignmentWithGnuAttr>,)> for HasCustomAlignmentWithGnuAttr { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new( - args: (ctor::RvalueReference<'b, crate::HasCustomAlignmentWithGnuAttr>,), + args: (::ctor::RvalueReference<'b, crate::HasCustomAlignmentWithGnuAttr>,), ) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<ctor::RvalueReference<'b,crate::HasCustomAlignmentWithGnuAttr>>>::ctor_new(arg) + <Self as ::ctor::CtorNew< + ::ctor::RvalueReference<'b, crate::HasCustomAlignmentWithGnuAttr>, + >>::ctor_new(arg) } } @@ -440,7 +443,7 @@ { #[inline(always)] fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, + self: ::std::pin::Pin<&'a mut Self>, __param_0: &'b crate::HasCustomAlignmentWithGnuAttr, ) { unsafe { @@ -449,13 +452,13 @@ } } -impl<'b> ::ctor::Assign<ctor::RvalueReference<'b, crate::HasCustomAlignmentWithGnuAttr>> +impl<'b> ::ctor::Assign<::ctor::RvalueReference<'b, crate::HasCustomAlignmentWithGnuAttr>> for HasCustomAlignmentWithGnuAttr { #[inline(always)] fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, - __param_0: ctor::RvalueReference<'b, crate::HasCustomAlignmentWithGnuAttr>, + self: ::std::pin::Pin<&'a mut Self>, + __param_0: ::ctor::RvalueReference<'b, crate::HasCustomAlignmentWithGnuAttr>, ) { unsafe { crate::detail::__rust_thunk___ZN29HasCustomAlignmentWithGnuAttraSEOS_(self, __param_0); @@ -470,94 +473,88 @@ use super::*; extern "C" { pub(crate) fn __rust_thunk___ZN18HasCustomAlignmentC1Ev<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::HasCustomAlignment>, + __this: &'a mut ::std::mem::MaybeUninit<crate::HasCustomAlignment>, ); pub(crate) fn __rust_thunk___ZN18HasCustomAlignmentC1ERKS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::HasCustomAlignment>, + __this: &'a mut ::std::mem::MaybeUninit<crate::HasCustomAlignment>, __param_0: &'b crate::HasCustomAlignment, ); pub(crate) fn __rust_thunk___ZN18HasCustomAlignmentC1EOS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::HasCustomAlignment>, - __param_0: ctor::RvalueReference<'b, crate::HasCustomAlignment>, + __this: &'a mut ::std::mem::MaybeUninit<crate::HasCustomAlignment>, + __param_0: ::ctor::RvalueReference<'b, crate::HasCustomAlignment>, ); pub(crate) fn __rust_thunk___ZN18HasCustomAlignmentaSERKS_<'a, 'b>( - __this: crate::rust_std::pin::Pin<&'a mut crate::HasCustomAlignment>, + __this: ::std::pin::Pin<&'a mut crate::HasCustomAlignment>, __param_0: &'b crate::HasCustomAlignment, - ) -> crate::rust_std::pin::Pin<&'a mut crate::HasCustomAlignment>; + ) -> ::std::pin::Pin<&'a mut crate::HasCustomAlignment>; pub(crate) fn __rust_thunk___ZN18HasCustomAlignmentaSEOS_<'a, 'b>( - __this: crate::rust_std::pin::Pin<&'a mut crate::HasCustomAlignment>, - __param_0: ctor::RvalueReference<'b, crate::HasCustomAlignment>, - ) -> crate::rust_std::pin::Pin<&'a mut crate::HasCustomAlignment>; + __this: ::std::pin::Pin<&'a mut crate::HasCustomAlignment>, + __param_0: ::ctor::RvalueReference<'b, crate::HasCustomAlignment>, + ) -> ::std::pin::Pin<&'a mut crate::HasCustomAlignment>; pub(crate) fn __rust_thunk___ZN27HasFieldWithCustomAlignmentC1Ev<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::HasFieldWithCustomAlignment>, + __this: &'a mut ::std::mem::MaybeUninit<crate::HasFieldWithCustomAlignment>, ); pub(crate) fn __rust_thunk___ZN27HasFieldWithCustomAlignmentC1ERKS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::HasFieldWithCustomAlignment>, + __this: &'a mut ::std::mem::MaybeUninit<crate::HasFieldWithCustomAlignment>, __param_0: &'b crate::HasFieldWithCustomAlignment, ); pub(crate) fn __rust_thunk___ZN27HasFieldWithCustomAlignmentC1EOS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::HasFieldWithCustomAlignment>, - __param_0: ctor::RvalueReference<'b, crate::HasFieldWithCustomAlignment>, + __this: &'a mut ::std::mem::MaybeUninit<crate::HasFieldWithCustomAlignment>, + __param_0: ::ctor::RvalueReference<'b, crate::HasFieldWithCustomAlignment>, ); pub(crate) fn __rust_thunk___ZN27HasFieldWithCustomAlignmentaSERKS_<'a, 'b>( - __this: crate::rust_std::pin::Pin<&'a mut crate::HasFieldWithCustomAlignment>, + __this: ::std::pin::Pin<&'a mut crate::HasFieldWithCustomAlignment>, __param_0: &'b crate::HasFieldWithCustomAlignment, - ) -> crate::rust_std::pin::Pin<&'a mut crate::HasFieldWithCustomAlignment>; + ) -> ::std::pin::Pin<&'a mut crate::HasFieldWithCustomAlignment>; pub(crate) fn __rust_thunk___ZN27HasFieldWithCustomAlignmentaSEOS_<'a, 'b>( - __this: crate::rust_std::pin::Pin<&'a mut crate::HasFieldWithCustomAlignment>, - __param_0: ctor::RvalueReference<'b, crate::HasFieldWithCustomAlignment>, - ) -> crate::rust_std::pin::Pin<&'a mut crate::HasFieldWithCustomAlignment>; + __this: ::std::pin::Pin<&'a mut crate::HasFieldWithCustomAlignment>, + __param_0: ::ctor::RvalueReference<'b, crate::HasFieldWithCustomAlignment>, + ) -> ::std::pin::Pin<&'a mut crate::HasFieldWithCustomAlignment>; pub(crate) fn __rust_thunk___ZN35InheritsFromBaseWithCustomAlignmentC1Ev<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit< - crate::InheritsFromBaseWithCustomAlignment, - >, + __this: &'a mut ::std::mem::MaybeUninit<crate::InheritsFromBaseWithCustomAlignment>, ); pub(crate) fn __rust_thunk___ZN35InheritsFromBaseWithCustomAlignmentC1ERKS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit< - crate::InheritsFromBaseWithCustomAlignment, - >, + __this: &'a mut ::std::mem::MaybeUninit<crate::InheritsFromBaseWithCustomAlignment>, __param_0: &'b crate::InheritsFromBaseWithCustomAlignment, ); pub(crate) fn __rust_thunk___ZN35InheritsFromBaseWithCustomAlignmentC1EOS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit< - crate::InheritsFromBaseWithCustomAlignment, - >, - __param_0: ctor::RvalueReference<'b, crate::InheritsFromBaseWithCustomAlignment>, + __this: &'a mut ::std::mem::MaybeUninit<crate::InheritsFromBaseWithCustomAlignment>, + __param_0: ::ctor::RvalueReference<'b, crate::InheritsFromBaseWithCustomAlignment>, ); pub(crate) fn __rust_thunk___ZN35InheritsFromBaseWithCustomAlignmentaSERKS_<'a, 'b>( - __this: crate::rust_std::pin::Pin<&'a mut crate::InheritsFromBaseWithCustomAlignment>, + __this: ::std::pin::Pin<&'a mut crate::InheritsFromBaseWithCustomAlignment>, __param_0: &'b crate::InheritsFromBaseWithCustomAlignment, - ) -> crate::rust_std::pin::Pin<&'a mut crate::InheritsFromBaseWithCustomAlignment>; + ) -> ::std::pin::Pin<&'a mut crate::InheritsFromBaseWithCustomAlignment>; pub(crate) fn __rust_thunk___ZN35InheritsFromBaseWithCustomAlignmentaSEOS_<'a, 'b>( - __this: crate::rust_std::pin::Pin<&'a mut crate::InheritsFromBaseWithCustomAlignment>, - __param_0: ctor::RvalueReference<'b, crate::InheritsFromBaseWithCustomAlignment>, - ) -> crate::rust_std::pin::Pin<&'a mut crate::InheritsFromBaseWithCustomAlignment>; + __this: ::std::pin::Pin<&'a mut crate::InheritsFromBaseWithCustomAlignment>, + __param_0: ::ctor::RvalueReference<'b, crate::InheritsFromBaseWithCustomAlignment>, + ) -> ::std::pin::Pin<&'a mut crate::InheritsFromBaseWithCustomAlignment>; pub(crate) fn __rust_thunk___ZN29HasCustomAlignmentWithGnuAttrC1Ev<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::HasCustomAlignmentWithGnuAttr>, + __this: &'a mut ::std::mem::MaybeUninit<crate::HasCustomAlignmentWithGnuAttr>, ); pub(crate) fn __rust_thunk___ZN29HasCustomAlignmentWithGnuAttrC1ERKS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::HasCustomAlignmentWithGnuAttr>, + __this: &'a mut ::std::mem::MaybeUninit<crate::HasCustomAlignmentWithGnuAttr>, __param_0: &'b crate::HasCustomAlignmentWithGnuAttr, ); pub(crate) fn __rust_thunk___ZN29HasCustomAlignmentWithGnuAttrC1EOS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::HasCustomAlignmentWithGnuAttr>, - __param_0: ctor::RvalueReference<'b, crate::HasCustomAlignmentWithGnuAttr>, + __this: &'a mut ::std::mem::MaybeUninit<crate::HasCustomAlignmentWithGnuAttr>, + __param_0: ::ctor::RvalueReference<'b, crate::HasCustomAlignmentWithGnuAttr>, ); pub(crate) fn __rust_thunk___ZN29HasCustomAlignmentWithGnuAttraSERKS_<'a, 'b>( - __this: crate::rust_std::pin::Pin<&'a mut crate::HasCustomAlignmentWithGnuAttr>, + __this: ::std::pin::Pin<&'a mut crate::HasCustomAlignmentWithGnuAttr>, __param_0: &'b crate::HasCustomAlignmentWithGnuAttr, - ) -> crate::rust_std::pin::Pin<&'a mut crate::HasCustomAlignmentWithGnuAttr>; + ) -> ::std::pin::Pin<&'a mut crate::HasCustomAlignmentWithGnuAttr>; pub(crate) fn __rust_thunk___ZN29HasCustomAlignmentWithGnuAttraSEOS_<'a, 'b>( - __this: crate::rust_std::pin::Pin<&'a mut crate::HasCustomAlignmentWithGnuAttr>, - __param_0: ctor::RvalueReference<'b, crate::HasCustomAlignmentWithGnuAttr>, - ) -> crate::rust_std::pin::Pin<&'a mut crate::HasCustomAlignmentWithGnuAttr>; + __this: ::std::pin::Pin<&'a mut crate::HasCustomAlignmentWithGnuAttr>, + __param_0: ::ctor::RvalueReference<'b, crate::HasCustomAlignmentWithGnuAttr>, + ) -> ::std::pin::Pin<&'a mut crate::HasCustomAlignmentWithGnuAttr>; } } -const _: () = assert!(rust_std::mem::size_of::<Option<&i32>>() == rust_std::mem::size_of::<&i32>()); +const _: () = assert!(::std::mem::size_of::<Option<&i32>>() == ::std::mem::size_of::<&i32>()); -const _: () = assert!(rust_std::mem::size_of::<crate::HasCustomAlignment>() == 64); -const _: () = assert!(rust_std::mem::align_of::<crate::HasCustomAlignment>() == 64); +const _: () = assert!(::std::mem::size_of::<crate::HasCustomAlignment>() == 64); +const _: () = assert!(::std::mem::align_of::<crate::HasCustomAlignment>() == 64); const _: () = { static_assertions::assert_not_impl_any!(crate::HasCustomAlignment: Copy); }; @@ -565,8 +562,8 @@ static_assertions::assert_not_impl_any!(crate::HasCustomAlignment: Drop); }; -const _: () = assert!(rust_std::mem::size_of::<crate::HasFieldWithCustomAlignment>() == 64); -const _: () = assert!(rust_std::mem::align_of::<crate::HasFieldWithCustomAlignment>() == 64); +const _: () = assert!(::std::mem::size_of::<crate::HasFieldWithCustomAlignment>() == 64); +const _: () = assert!(::std::mem::align_of::<crate::HasFieldWithCustomAlignment>() == 64); const _: () = { static_assertions::assert_not_impl_any!(crate::HasFieldWithCustomAlignment: Copy); }; @@ -576,9 +573,8 @@ const _: () = assert!(memoffset_unstable_const::offset_of!(crate::HasFieldWithCustomAlignment, field) == 0); -const _: () = assert!(rust_std::mem::size_of::<crate::InheritsFromBaseWithCustomAlignment>() == 64); -const _: () = - assert!(rust_std::mem::align_of::<crate::InheritsFromBaseWithCustomAlignment>() == 64); +const _: () = assert!(::std::mem::size_of::<crate::InheritsFromBaseWithCustomAlignment>() == 64); +const _: () = assert!(::std::mem::align_of::<crate::InheritsFromBaseWithCustomAlignment>() == 64); const _: () = { static_assertions::assert_not_impl_any!(crate::InheritsFromBaseWithCustomAlignment: Copy); }; @@ -586,8 +582,8 @@ static_assertions::assert_not_impl_any!(crate::InheritsFromBaseWithCustomAlignment: Drop); }; -const _: () = assert!(rust_std::mem::size_of::<crate::HasCustomAlignmentWithGnuAttr>() == 64); -const _: () = assert!(rust_std::mem::align_of::<crate::HasCustomAlignmentWithGnuAttr>() == 64); +const _: () = assert!(::std::mem::size_of::<crate::HasCustomAlignmentWithGnuAttr>() == 64); +const _: () = assert!(::std::mem::align_of::<crate::HasCustomAlignmentWithGnuAttr>() == 64); const _: () = { static_assertions::assert_not_impl_any!(crate::HasCustomAlignmentWithGnuAttr: Copy); };
diff --git a/rs_bindings_from_cc/test/golden/comment_rs_api.rs b/rs_bindings_from_cc/test/golden/comment_rs_api.rs index c19b207..bcc1079 100644 --- a/rs_bindings_from_cc/test/golden/comment_rs_api.rs +++ b/rs_bindings_from_cc/test/golden/comment_rs_api.rs
@@ -11,8 +11,6 @@ #![allow(non_upper_case_globals)] #![deny(warnings)] -use ::std as rust_std; - // Part of the Crubit project, under the Apache License v2.0 with LLVM // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception @@ -37,7 +35,7 @@ impl Default for Foo { #[inline(always)] fn default() -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN3FooC1Ev(&mut tmp); tmp.assume_init() @@ -45,10 +43,10 @@ } } -impl<'b> From<ctor::RvalueReference<'b, crate::Foo>> for Foo { +impl<'b> From<::ctor::RvalueReference<'b, crate::Foo>> for Foo { #[inline(always)] - fn from(__param_0: ctor::RvalueReference<'b, crate::Foo>) -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + fn from(__param_0: ::ctor::RvalueReference<'b, crate::Foo>) -> Self { + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN3FooC1EOS_(&mut tmp, __param_0); tmp.assume_init() @@ -96,7 +94,7 @@ impl Default for Bar { #[inline(always)] fn default() -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN3BarC1Ev(&mut tmp); tmp.assume_init() @@ -104,10 +102,10 @@ } } -impl<'b> From<ctor::RvalueReference<'b, crate::Bar>> for Bar { +impl<'b> From<::ctor::RvalueReference<'b, crate::Bar>> for Bar { #[inline(always)] - fn from(__param_0: ctor::RvalueReference<'b, crate::Bar>) -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + fn from(__param_0: ::ctor::RvalueReference<'b, crate::Bar>) -> Self { + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN3BarC1EOS_(&mut tmp, __param_0); tmp.assume_init() @@ -134,7 +132,7 @@ impl Default for HasNoComments { #[inline(always)] fn default() -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN13HasNoCommentsC1Ev(&mut tmp); tmp.assume_init() @@ -142,10 +140,10 @@ } } -impl<'b> From<ctor::RvalueReference<'b, crate::HasNoComments>> for HasNoComments { +impl<'b> From<::ctor::RvalueReference<'b, crate::HasNoComments>> for HasNoComments { #[inline(always)] - fn from(__param_0: ctor::RvalueReference<'b, crate::HasNoComments>) -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + fn from(__param_0: ::ctor::RvalueReference<'b, crate::HasNoComments>) -> Self { + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN13HasNoCommentsC1EOS_(&mut tmp, __param_0); tmp.assume_init() @@ -170,34 +168,34 @@ use super::*; extern "C" { pub(crate) fn __rust_thunk___ZN3FooC1Ev<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::Foo>, + __this: &'a mut ::std::mem::MaybeUninit<crate::Foo>, ); pub(crate) fn __rust_thunk___ZN3FooC1EOS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::Foo>, - __param_0: ctor::RvalueReference<'b, crate::Foo>, + __this: &'a mut ::std::mem::MaybeUninit<crate::Foo>, + __param_0: ::ctor::RvalueReference<'b, crate::Foo>, ); pub(crate) fn __rust_thunk___Z3foov(); pub(crate) fn __rust_thunk___ZN3BarC1Ev<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::Bar>, + __this: &'a mut ::std::mem::MaybeUninit<crate::Bar>, ); pub(crate) fn __rust_thunk___ZN3BarC1EOS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::Bar>, - __param_0: ctor::RvalueReference<'b, crate::Bar>, + __this: &'a mut ::std::mem::MaybeUninit<crate::Bar>, + __param_0: ::ctor::RvalueReference<'b, crate::Bar>, ); pub(crate) fn __rust_thunk___ZN13HasNoCommentsC1Ev<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::HasNoComments>, + __this: &'a mut ::std::mem::MaybeUninit<crate::HasNoComments>, ); pub(crate) fn __rust_thunk___ZN13HasNoCommentsC1EOS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::HasNoComments>, - __param_0: ctor::RvalueReference<'b, crate::HasNoComments>, + __this: &'a mut ::std::mem::MaybeUninit<crate::HasNoComments>, + __param_0: ::ctor::RvalueReference<'b, crate::HasNoComments>, ); } } -const _: () = assert!(rust_std::mem::size_of::<Option<&i32>>() == rust_std::mem::size_of::<&i32>()); +const _: () = assert!(::std::mem::size_of::<Option<&i32>>() == ::std::mem::size_of::<&i32>()); -const _: () = assert!(rust_std::mem::size_of::<crate::Foo>() == 8); -const _: () = assert!(rust_std::mem::align_of::<crate::Foo>() == 4); +const _: () = assert!(::std::mem::size_of::<crate::Foo>() == 8); +const _: () = assert!(::std::mem::align_of::<crate::Foo>() == 4); const _: () = { static_assertions::assert_impl_all!(crate::Foo: Clone); }; @@ -210,8 +208,8 @@ const _: () = assert!(memoffset_unstable_const::offset_of!(crate::Foo, i) == 0); const _: () = assert!(memoffset_unstable_const::offset_of!(crate::Foo, j) == 4); -const _: () = assert!(rust_std::mem::size_of::<crate::Bar>() == 4); -const _: () = assert!(rust_std::mem::align_of::<crate::Bar>() == 4); +const _: () = assert!(::std::mem::size_of::<crate::Bar>() == 4); +const _: () = assert!(::std::mem::align_of::<crate::Bar>() == 4); const _: () = { static_assertions::assert_impl_all!(crate::Bar: Clone); }; @@ -223,8 +221,8 @@ }; const _: () = assert!(memoffset_unstable_const::offset_of!(crate::Bar, i) == 0); -const _: () = assert!(rust_std::mem::size_of::<crate::HasNoComments>() == 4); -const _: () = assert!(rust_std::mem::align_of::<crate::HasNoComments>() == 4); +const _: () = assert!(::std::mem::size_of::<crate::HasNoComments>() == 4); +const _: () = assert!(::std::mem::align_of::<crate::HasNoComments>() == 4); const _: () = { static_assertions::assert_impl_all!(crate::HasNoComments: Clone); };
diff --git a/rs_bindings_from_cc/test/golden/doc_comment_rs_api.rs b/rs_bindings_from_cc/test/golden/doc_comment_rs_api.rs index 7a1b6fa..08a7d95 100644 --- a/rs_bindings_from_cc/test/golden/doc_comment_rs_api.rs +++ b/rs_bindings_from_cc/test/golden/doc_comment_rs_api.rs
@@ -11,8 +11,6 @@ #![allow(non_upper_case_globals)] #![deny(warnings)] -use ::std as rust_std; - // Part of the Crubit project, under the Apache License v2.0 with LLVM // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception @@ -23,7 +21,7 @@ #[derive(Clone, Copy)] #[repr(C)] pub struct DocCommentSlashes { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 0], + __non_field_data: [::std::mem::MaybeUninit<u8>; 0], /// A field. pub i: i32, } @@ -32,10 +30,10 @@ crate::DocCommentSlashes ); -impl<'b> From<ctor::RvalueReference<'b, crate::DocCommentSlashes>> for DocCommentSlashes { +impl<'b> From<::ctor::RvalueReference<'b, crate::DocCommentSlashes>> for DocCommentSlashes { #[inline(always)] - fn from(__param_0: ctor::RvalueReference<'b, crate::DocCommentSlashes>) -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + fn from(__param_0: ::ctor::RvalueReference<'b, crate::DocCommentSlashes>) -> Self { + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN17DocCommentSlashesC1EOS_(&mut tmp, __param_0); tmp.assume_init() @@ -56,7 +54,7 @@ impl Default for DocCommentSlashes { #[inline(always)] fn default() -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN17DocCommentSlashesC1Ev(&mut tmp); tmp.assume_init() @@ -69,7 +67,7 @@ impl From<i32> for DocCommentSlashes { #[inline(always)] fn from(__param_0: i32) -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN17DocCommentSlashesC1Ei(&mut tmp, __param_0); tmp.assume_init() @@ -117,7 +115,7 @@ impl Default for DocCommentBang { #[inline(always)] fn default() -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN14DocCommentBangC1Ev(&mut tmp); tmp.assume_init() @@ -125,10 +123,10 @@ } } -impl<'b> From<ctor::RvalueReference<'b, crate::DocCommentBang>> for DocCommentBang { +impl<'b> From<::ctor::RvalueReference<'b, crate::DocCommentBang>> for DocCommentBang { #[inline(always)] - fn from(__param_0: ctor::RvalueReference<'b, crate::DocCommentBang>) -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + fn from(__param_0: ::ctor::RvalueReference<'b, crate::DocCommentBang>) -> Self { + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN14DocCommentBangC1EOS_(&mut tmp, __param_0); tmp.assume_init() @@ -161,7 +159,7 @@ impl Default for MultilineCommentTwoStars { #[inline(always)] fn default() -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN24MultilineCommentTwoStarsC1Ev(&mut tmp); tmp.assume_init() @@ -169,12 +167,12 @@ } } -impl<'b> From<ctor::RvalueReference<'b, crate::MultilineCommentTwoStars>> +impl<'b> From<::ctor::RvalueReference<'b, crate::MultilineCommentTwoStars>> for MultilineCommentTwoStars { #[inline(always)] - fn from(__param_0: ctor::RvalueReference<'b, crate::MultilineCommentTwoStars>) -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + fn from(__param_0: ::ctor::RvalueReference<'b, crate::MultilineCommentTwoStars>) -> Self { + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN24MultilineCommentTwoStarsC1EOS_(&mut tmp, __param_0); tmp.assume_init() @@ -204,7 +202,7 @@ impl Default for LineComment { #[inline(always)] fn default() -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN11LineCommentC1Ev(&mut tmp); tmp.assume_init() @@ -212,10 +210,10 @@ } } -impl<'b> From<ctor::RvalueReference<'b, crate::LineComment>> for LineComment { +impl<'b> From<::ctor::RvalueReference<'b, crate::LineComment>> for LineComment { #[inline(always)] - fn from(__param_0: ctor::RvalueReference<'b, crate::LineComment>) -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + fn from(__param_0: ::ctor::RvalueReference<'b, crate::LineComment>) -> Self { + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN11LineCommentC1EOS_(&mut tmp, __param_0); tmp.assume_init() @@ -248,7 +246,7 @@ impl Default for MultilineOneStar { #[inline(always)] fn default() -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN16MultilineOneStarC1Ev(&mut tmp); tmp.assume_init() @@ -256,10 +254,10 @@ } } -impl<'b> From<ctor::RvalueReference<'b, crate::MultilineOneStar>> for MultilineOneStar { +impl<'b> From<::ctor::RvalueReference<'b, crate::MultilineOneStar>> for MultilineOneStar { #[inline(always)] - fn from(__param_0: ctor::RvalueReference<'b, crate::MultilineOneStar>) -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + fn from(__param_0: ::ctor::RvalueReference<'b, crate::MultilineOneStar>) -> Self { + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN16MultilineOneStarC1EOS_(&mut tmp, __param_0); tmp.assume_init() @@ -303,7 +301,7 @@ impl Default for __CcTemplateInst10MyTemplateIfE { #[inline(always)] fn default() -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN10MyTemplateIfEC1Ev__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3adoc_5fcomment_5fcc(&mut tmp); tmp.assume_init() @@ -311,12 +309,14 @@ } } -impl<'b> From<ctor::RvalueReference<'b, crate::__CcTemplateInst10MyTemplateIfE>> +impl<'b> From<::ctor::RvalueReference<'b, crate::__CcTemplateInst10MyTemplateIfE>> for __CcTemplateInst10MyTemplateIfE { #[inline(always)] - fn from(__param_0: ctor::RvalueReference<'b, crate::__CcTemplateInst10MyTemplateIfE>) -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + fn from( + __param_0: ::ctor::RvalueReference<'b, crate::__CcTemplateInst10MyTemplateIfE>, + ) -> Self { + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN10MyTemplateIfEC1EOS0___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3adoc_5fcomment_5fcc(&mut tmp,__param_0); tmp.assume_init() @@ -373,7 +373,7 @@ impl Default for __CcTemplateInst10MyTemplateIiE { #[inline(always)] fn default() -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN10MyTemplateIiEC1Ev__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3adoc_5fcomment_5fcc(&mut tmp); tmp.assume_init() @@ -381,12 +381,14 @@ } } -impl<'b> From<ctor::RvalueReference<'b, crate::__CcTemplateInst10MyTemplateIiE>> +impl<'b> From<::ctor::RvalueReference<'b, crate::__CcTemplateInst10MyTemplateIiE>> for __CcTemplateInst10MyTemplateIiE { #[inline(always)] - fn from(__param_0: ctor::RvalueReference<'b, crate::__CcTemplateInst10MyTemplateIiE>) -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + fn from( + __param_0: ::ctor::RvalueReference<'b, crate::__CcTemplateInst10MyTemplateIiE>, + ) -> Self { + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN10MyTemplateIiEC1EOS0___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3adoc_5fcomment_5fcc(&mut tmp,__param_0); tmp.assume_init() @@ -419,16 +421,16 @@ use super::*; extern "C" { pub(crate) fn __rust_thunk___ZN17DocCommentSlashesC1EOS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::DocCommentSlashes>, - __param_0: ctor::RvalueReference<'b, crate::DocCommentSlashes>, + __this: &'a mut ::std::mem::MaybeUninit<crate::DocCommentSlashes>, + __param_0: ::ctor::RvalueReference<'b, crate::DocCommentSlashes>, ); #[link_name = "_ZN17DocCommentSlashesC1Ev"] pub(crate) fn __rust_thunk___ZN17DocCommentSlashesC1Ev<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::DocCommentSlashes>, + __this: &'a mut ::std::mem::MaybeUninit<crate::DocCommentSlashes>, ); #[link_name = "_ZN17DocCommentSlashesC1Ei"] pub(crate) fn __rust_thunk___ZN17DocCommentSlashesC1Ei<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::DocCommentSlashes>, + __this: &'a mut ::std::mem::MaybeUninit<crate::DocCommentSlashes>, __param_0: i32, ); #[link_name = "_ZNK17DocCommentSlashes15get_field_valueEv"] @@ -443,49 +445,45 @@ #[link_name = "_ZN17DocCommentSlashes13static_methodEv"] pub(crate) fn __rust_thunk___ZN17DocCommentSlashes13static_methodEv() -> i32; pub(crate) fn __rust_thunk___ZN14DocCommentBangC1Ev<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::DocCommentBang>, + __this: &'a mut ::std::mem::MaybeUninit<crate::DocCommentBang>, ); pub(crate) fn __rust_thunk___ZN14DocCommentBangC1EOS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::DocCommentBang>, - __param_0: ctor::RvalueReference<'b, crate::DocCommentBang>, + __this: &'a mut ::std::mem::MaybeUninit<crate::DocCommentBang>, + __param_0: ::ctor::RvalueReference<'b, crate::DocCommentBang>, ); pub(crate) fn __rust_thunk___ZN24MultilineCommentTwoStarsC1Ev<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::MultilineCommentTwoStars>, + __this: &'a mut ::std::mem::MaybeUninit<crate::MultilineCommentTwoStars>, ); pub(crate) fn __rust_thunk___ZN24MultilineCommentTwoStarsC1EOS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::MultilineCommentTwoStars>, - __param_0: ctor::RvalueReference<'b, crate::MultilineCommentTwoStars>, + __this: &'a mut ::std::mem::MaybeUninit<crate::MultilineCommentTwoStars>, + __param_0: ::ctor::RvalueReference<'b, crate::MultilineCommentTwoStars>, ); pub(crate) fn __rust_thunk___ZN11LineCommentC1Ev<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::LineComment>, + __this: &'a mut ::std::mem::MaybeUninit<crate::LineComment>, ); pub(crate) fn __rust_thunk___ZN11LineCommentC1EOS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::LineComment>, - __param_0: ctor::RvalueReference<'b, crate::LineComment>, + __this: &'a mut ::std::mem::MaybeUninit<crate::LineComment>, + __param_0: ::ctor::RvalueReference<'b, crate::LineComment>, ); pub(crate) fn __rust_thunk___ZN16MultilineOneStarC1Ev<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::MultilineOneStar>, + __this: &'a mut ::std::mem::MaybeUninit<crate::MultilineOneStar>, ); pub(crate) fn __rust_thunk___ZN16MultilineOneStarC1EOS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::MultilineOneStar>, - __param_0: ctor::RvalueReference<'b, crate::MultilineOneStar>, + __this: &'a mut ::std::mem::MaybeUninit<crate::MultilineOneStar>, + __param_0: ::ctor::RvalueReference<'b, crate::MultilineOneStar>, ); pub(crate) fn __rust_thunk___Z3foov() -> i32; pub(crate) fn __rust_thunk___ZN10MyTemplateIfEC1Ev__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3adoc_5fcomment_5fcc< 'a, >( - __this: &'a mut crate::rust_std::mem::MaybeUninit< - crate::__CcTemplateInst10MyTemplateIfE, - >, + __this: &'a mut ::std::mem::MaybeUninit<crate::__CcTemplateInst10MyTemplateIfE>, ); pub(crate) fn __rust_thunk___ZN10MyTemplateIfEC1EOS0___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3adoc_5fcomment_5fcc< 'a, 'b, >( - __this: &'a mut crate::rust_std::mem::MaybeUninit< - crate::__CcTemplateInst10MyTemplateIfE, - >, - __param_0: ctor::RvalueReference<'b, crate::__CcTemplateInst10MyTemplateIfE>, + __this: &'a mut ::std::mem::MaybeUninit<crate::__CcTemplateInst10MyTemplateIfE>, + __param_0: ::ctor::RvalueReference<'b, crate::__CcTemplateInst10MyTemplateIfE>, ); pub(crate) fn __rust_thunk___ZNK10MyTemplateIfE15get_field_valueEv__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3adoc_5fcomment_5fcc< 'a, @@ -495,18 +493,14 @@ pub(crate) fn __rust_thunk___ZN10MyTemplateIiEC1Ev__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3adoc_5fcomment_5fcc< 'a, >( - __this: &'a mut crate::rust_std::mem::MaybeUninit< - crate::__CcTemplateInst10MyTemplateIiE, - >, + __this: &'a mut ::std::mem::MaybeUninit<crate::__CcTemplateInst10MyTemplateIiE>, ); pub(crate) fn __rust_thunk___ZN10MyTemplateIiEC1EOS0___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3adoc_5fcomment_5fcc< 'a, 'b, >( - __this: &'a mut crate::rust_std::mem::MaybeUninit< - crate::__CcTemplateInst10MyTemplateIiE, - >, - __param_0: ctor::RvalueReference<'b, crate::__CcTemplateInst10MyTemplateIiE>, + __this: &'a mut ::std::mem::MaybeUninit<crate::__CcTemplateInst10MyTemplateIiE>, + __param_0: ::ctor::RvalueReference<'b, crate::__CcTemplateInst10MyTemplateIiE>, ); pub(crate) fn __rust_thunk___ZNK10MyTemplateIiE15get_field_valueEv__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3adoc_5fcomment_5fcc< 'a, @@ -516,10 +510,10 @@ } } -const _: () = assert!(rust_std::mem::size_of::<Option<&i32>>() == rust_std::mem::size_of::<&i32>()); +const _: () = assert!(::std::mem::size_of::<Option<&i32>>() == ::std::mem::size_of::<&i32>()); -const _: () = assert!(rust_std::mem::size_of::<crate::DocCommentSlashes>() == 4); -const _: () = assert!(rust_std::mem::align_of::<crate::DocCommentSlashes>() == 4); +const _: () = assert!(::std::mem::size_of::<crate::DocCommentSlashes>() == 4); +const _: () = assert!(::std::mem::align_of::<crate::DocCommentSlashes>() == 4); const _: () = { static_assertions::assert_impl_all!(crate::DocCommentSlashes: Clone); }; @@ -531,8 +525,8 @@ }; const _: () = assert!(memoffset_unstable_const::offset_of!(crate::DocCommentSlashes, i) == 0); -const _: () = assert!(rust_std::mem::size_of::<crate::DocCommentBang>() == 4); -const _: () = assert!(rust_std::mem::align_of::<crate::DocCommentBang>() == 4); +const _: () = assert!(::std::mem::size_of::<crate::DocCommentBang>() == 4); +const _: () = assert!(::std::mem::align_of::<crate::DocCommentBang>() == 4); const _: () = { static_assertions::assert_impl_all!(crate::DocCommentBang: Clone); }; @@ -544,8 +538,8 @@ }; const _: () = assert!(memoffset_unstable_const::offset_of!(crate::DocCommentBang, i) == 0); -const _: () = assert!(rust_std::mem::size_of::<crate::MultilineCommentTwoStars>() == 4); -const _: () = assert!(rust_std::mem::align_of::<crate::MultilineCommentTwoStars>() == 4); +const _: () = assert!(::std::mem::size_of::<crate::MultilineCommentTwoStars>() == 4); +const _: () = assert!(::std::mem::align_of::<crate::MultilineCommentTwoStars>() == 4); const _: () = { static_assertions::assert_impl_all!(crate::MultilineCommentTwoStars: Clone); }; @@ -558,8 +552,8 @@ const _: () = assert!(memoffset_unstable_const::offset_of!(crate::MultilineCommentTwoStars, i) == 0); -const _: () = assert!(rust_std::mem::size_of::<crate::LineComment>() == 4); -const _: () = assert!(rust_std::mem::align_of::<crate::LineComment>() == 4); +const _: () = assert!(::std::mem::size_of::<crate::LineComment>() == 4); +const _: () = assert!(::std::mem::align_of::<crate::LineComment>() == 4); const _: () = { static_assertions::assert_impl_all!(crate::LineComment: Clone); }; @@ -571,8 +565,8 @@ }; const _: () = assert!(memoffset_unstable_const::offset_of!(crate::LineComment, i) == 0); -const _: () = assert!(rust_std::mem::size_of::<crate::MultilineOneStar>() == 4); -const _: () = assert!(rust_std::mem::align_of::<crate::MultilineOneStar>() == 4); +const _: () = assert!(::std::mem::size_of::<crate::MultilineOneStar>() == 4); +const _: () = assert!(::std::mem::align_of::<crate::MultilineOneStar>() == 4); const _: () = { static_assertions::assert_impl_all!(crate::MultilineOneStar: Clone); }; @@ -584,8 +578,8 @@ }; const _: () = assert!(memoffset_unstable_const::offset_of!(crate::MultilineOneStar, i) == 0); -const _: () = assert!(rust_std::mem::size_of::<crate::__CcTemplateInst10MyTemplateIfE>() == 4); -const _: () = assert!(rust_std::mem::align_of::<crate::__CcTemplateInst10MyTemplateIfE>() == 4); +const _: () = assert!(::std::mem::size_of::<crate::__CcTemplateInst10MyTemplateIfE>() == 4); +const _: () = assert!(::std::mem::align_of::<crate::__CcTemplateInst10MyTemplateIfE>() == 4); const _: () = { static_assertions::assert_impl_all!(crate::__CcTemplateInst10MyTemplateIfE: Clone); }; @@ -599,8 +593,8 @@ memoffset_unstable_const::offset_of!(crate::__CcTemplateInst10MyTemplateIfE, value) == 0 ); -const _: () = assert!(rust_std::mem::size_of::<crate::__CcTemplateInst10MyTemplateIiE>() == 4); -const _: () = assert!(rust_std::mem::align_of::<crate::__CcTemplateInst10MyTemplateIiE>() == 4); +const _: () = assert!(::std::mem::size_of::<crate::__CcTemplateInst10MyTemplateIiE>() == 4); +const _: () = assert!(::std::mem::align_of::<crate::__CcTemplateInst10MyTemplateIiE>() == 4); const _: () = { static_assertions::assert_impl_all!(crate::__CcTemplateInst10MyTemplateIiE: Clone); };
diff --git a/rs_bindings_from_cc/test/golden/escaping_keywords_rs_api.rs b/rs_bindings_from_cc/test/golden/escaping_keywords_rs_api.rs index 63b9e3c..1cc656c 100644 --- a/rs_bindings_from_cc/test/golden/escaping_keywords_rs_api.rs +++ b/rs_bindings_from_cc/test/golden/escaping_keywords_rs_api.rs
@@ -11,8 +11,6 @@ #![allow(non_upper_case_globals)] #![deny(warnings)] -use ::std as rust_std; - // Part of the Crubit project, under the Apache License v2.0 with LLVM // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception @@ -27,7 +25,7 @@ impl Default for r#type { #[inline(always)] fn default() -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN4typeC1Ev(&mut tmp); tmp.assume_init() @@ -35,10 +33,10 @@ } } -impl<'b> From<ctor::RvalueReference<'b, crate::r#type>> for r#type { +impl<'b> From<::ctor::RvalueReference<'b, crate::r#type>> for r#type { #[inline(always)] - fn from(__param_0: ctor::RvalueReference<'b, crate::r#type>) -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + fn from(__param_0: ::ctor::RvalueReference<'b, crate::r#type>) -> Self { + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN4typeC1EOS_(&mut tmp, __param_0); tmp.assume_init() @@ -74,21 +72,21 @@ use super::*; extern "C" { pub(crate) fn __rust_thunk___ZN4typeC1Ev<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::r#type>, + __this: &'a mut ::std::mem::MaybeUninit<crate::r#type>, ); pub(crate) fn __rust_thunk___ZN4typeC1EOS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::r#type>, - __param_0: ctor::RvalueReference<'b, crate::r#type>, + __this: &'a mut ::std::mem::MaybeUninit<crate::r#type>, + __param_0: ::ctor::RvalueReference<'b, crate::r#type>, ); #[link_name = "_Z4impli"] pub(crate) fn __rust_thunk___Z4impli(r#match: i32); } } -const _: () = assert!(rust_std::mem::size_of::<Option<&i32>>() == rust_std::mem::size_of::<&i32>()); +const _: () = assert!(::std::mem::size_of::<Option<&i32>>() == ::std::mem::size_of::<&i32>()); -const _: () = assert!(rust_std::mem::size_of::<crate::r#type>() == 4); -const _: () = assert!(rust_std::mem::align_of::<crate::r#type>() == 4); +const _: () = assert!(::std::mem::size_of::<crate::r#type>() == 4); +const _: () = assert!(::std::mem::align_of::<crate::r#type>() == 4); const _: () = { static_assertions::assert_impl_all!(crate::r#type: Clone); };
diff --git a/rs_bindings_from_cc/test/golden/inheritance_rs_api.rs b/rs_bindings_from_cc/test/golden/inheritance_rs_api.rs index ec7bc1d..04df6b4 100644 --- a/rs_bindings_from_cc/test/golden/inheritance_rs_api.rs +++ b/rs_bindings_from_cc/test/golden/inheritance_rs_api.rs
@@ -11,8 +11,6 @@ #![allow(non_upper_case_globals)] #![deny(warnings)] -use ::std as rust_std; - // Part of the Crubit project, under the Apache License v2.0 with LLVM // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception @@ -20,90 +18,90 @@ /// Using classes to force these to be non-POD. /// In the Itanium ABI, the tail padding of POD types cannot be reused by other /// objects, even if the POD type is potentially-overlapping. -#[ctor::recursively_pinned] +#[::ctor::recursively_pinned] #[repr(C)] pub struct Base0 { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 1], + __non_field_data: [::std::mem::MaybeUninit<u8>; 1], } forward_declare::unsafe_define!(forward_declare::symbol!("Base0"), crate::Base0); -impl ctor::CtorNew<()> for Base0 { - type CtorType = impl ctor::Ctor<Output = Self>; +impl ::ctor::CtorNew<()> for Base0 { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: ()) -> Self::CtorType { let () = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { - crate::detail::__rust_thunk___ZN5Base0C1Ev( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), - ); + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { + crate::detail::__rust_thunk___ZN5Base0C1Ev(::std::pin::Pin::into_inner_unchecked( + dest, + )); }, ) } } -impl<'b> ctor::CtorNew<&'b crate::Base0> for Base0 { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<&'b crate::Base0> for Base0 { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: &'b crate::Base0) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN5Base0C1ERKS_( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), __param_0, ); }, ) } } -impl<'b> ctor::CtorNew<(&'b crate::Base0,)> for Base0 { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<(&'b crate::Base0,)> for Base0 { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: (&'b crate::Base0,)) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<&'b crate::Base0>>::ctor_new(arg) + <Self as ::ctor::CtorNew<&'b crate::Base0>>::ctor_new(arg) } } -impl<'b> ctor::CtorNew<ctor::RvalueReference<'b, crate::Base0>> for Base0 { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<::ctor::RvalueReference<'b, crate::Base0>> for Base0 { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] - fn ctor_new(args: ctor::RvalueReference<'b, crate::Base0>) -> Self::CtorType { + fn ctor_new(args: ::ctor::RvalueReference<'b, crate::Base0>) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN5Base0C1EOS_( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), __param_0, ); }, ) } } -impl<'b> ctor::CtorNew<(ctor::RvalueReference<'b, crate::Base0>,)> for Base0 { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<(::ctor::RvalueReference<'b, crate::Base0>,)> for Base0 { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] - fn ctor_new(args: (ctor::RvalueReference<'b, crate::Base0>,)) -> Self::CtorType { + fn ctor_new(args: (::ctor::RvalueReference<'b, crate::Base0>,)) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<ctor::RvalueReference<'b, crate::Base0>>>::ctor_new(arg) + <Self as ::ctor::CtorNew<::ctor::RvalueReference<'b, crate::Base0>>>::ctor_new(arg) } } impl<'b> ::ctor::Assign<&'b crate::Base0> for Base0 { #[inline(always)] - fn assign<'a>(self: crate::rust_std::pin::Pin<&'a mut Self>, __param_0: &'b crate::Base0) { + fn assign<'a>(self: ::std::pin::Pin<&'a mut Self>, __param_0: &'b crate::Base0) { unsafe { crate::detail::__rust_thunk___ZN5Base0aSERKS_(self, __param_0); } } } -impl<'b> ::ctor::Assign<ctor::RvalueReference<'b, crate::Base0>> for Base0 { +impl<'b> ::ctor::Assign<::ctor::RvalueReference<'b, crate::Base0>> for Base0 { #[inline(always)] fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, - __param_0: ctor::RvalueReference<'b, crate::Base0>, + self: ::std::pin::Pin<&'a mut Self>, + __param_0: ::ctor::RvalueReference<'b, crate::Base0>, ) { unsafe { crate::detail::__rust_thunk___ZN5Base0aSEOS_(self, __param_0); @@ -111,96 +109,96 @@ } } -#[ctor::recursively_pinned] +#[::ctor::recursively_pinned] #[repr(C, align(8))] pub struct Base1 { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 0], + __non_field_data: [::std::mem::MaybeUninit<u8>; 0], /// Reason for representing this field as a blob of bytes: /// Types of non-public C++ fields can be elided away - pub(crate) b1_1_: [crate::rust_std::mem::MaybeUninit<u8>; 8], + pub(crate) b1_1_: [::std::mem::MaybeUninit<u8>; 8], /// Reason for representing this field as a blob of bytes: /// Types of non-public C++ fields can be elided away - pub(crate) b1_2_: [crate::rust_std::mem::MaybeUninit<u8>; 8], + pub(crate) b1_2_: [::std::mem::MaybeUninit<u8>; 8], } forward_declare::unsafe_define!(forward_declare::symbol!("Base1"), crate::Base1); -impl ctor::CtorNew<()> for Base1 { - type CtorType = impl ctor::Ctor<Output = Self>; +impl ::ctor::CtorNew<()> for Base1 { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: ()) -> Self::CtorType { let () = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { - crate::detail::__rust_thunk___ZN5Base1C1Ev( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), - ); + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { + crate::detail::__rust_thunk___ZN5Base1C1Ev(::std::pin::Pin::into_inner_unchecked( + dest, + )); }, ) } } -impl<'b> ctor::CtorNew<&'b crate::Base1> for Base1 { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<&'b crate::Base1> for Base1 { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: &'b crate::Base1) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN5Base1C1ERKS_( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), __param_0, ); }, ) } } -impl<'b> ctor::CtorNew<(&'b crate::Base1,)> for Base1 { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<(&'b crate::Base1,)> for Base1 { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: (&'b crate::Base1,)) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<&'b crate::Base1>>::ctor_new(arg) + <Self as ::ctor::CtorNew<&'b crate::Base1>>::ctor_new(arg) } } -impl<'b> ctor::CtorNew<ctor::RvalueReference<'b, crate::Base1>> for Base1 { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<::ctor::RvalueReference<'b, crate::Base1>> for Base1 { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] - fn ctor_new(args: ctor::RvalueReference<'b, crate::Base1>) -> Self::CtorType { + fn ctor_new(args: ::ctor::RvalueReference<'b, crate::Base1>) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN5Base1C1EOS_( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), __param_0, ); }, ) } } -impl<'b> ctor::CtorNew<(ctor::RvalueReference<'b, crate::Base1>,)> for Base1 { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<(::ctor::RvalueReference<'b, crate::Base1>,)> for Base1 { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] - fn ctor_new(args: (ctor::RvalueReference<'b, crate::Base1>,)) -> Self::CtorType { + fn ctor_new(args: (::ctor::RvalueReference<'b, crate::Base1>,)) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<ctor::RvalueReference<'b, crate::Base1>>>::ctor_new(arg) + <Self as ::ctor::CtorNew<::ctor::RvalueReference<'b, crate::Base1>>>::ctor_new(arg) } } impl<'b> ::ctor::Assign<&'b crate::Base1> for Base1 { #[inline(always)] - fn assign<'a>(self: crate::rust_std::pin::Pin<&'a mut Self>, __param_0: &'b crate::Base1) { + fn assign<'a>(self: ::std::pin::Pin<&'a mut Self>, __param_0: &'b crate::Base1) { unsafe { crate::detail::__rust_thunk___ZN5Base1aSERKS_(self, __param_0); } } } -impl<'b> ::ctor::Assign<ctor::RvalueReference<'b, crate::Base1>> for Base1 { +impl<'b> ::ctor::Assign<::ctor::RvalueReference<'b, crate::Base1>> for Base1 { #[inline(always)] fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, - __param_0: ctor::RvalueReference<'b, crate::Base1>, + self: ::std::pin::Pin<&'a mut Self>, + __param_0: ::ctor::RvalueReference<'b, crate::Base1>, ) { unsafe { crate::detail::__rust_thunk___ZN5Base1aSEOS_(self, __param_0); @@ -208,93 +206,93 @@ } } -#[ctor::recursively_pinned] +#[::ctor::recursively_pinned] #[repr(C, align(2))] pub struct Base2 { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 0], + __non_field_data: [::std::mem::MaybeUninit<u8>; 0], /// Reason for representing this field as a blob of bytes: /// Types of non-public C++ fields can be elided away - pub(crate) b2_1_: [crate::rust_std::mem::MaybeUninit<u8>; 2], + pub(crate) b2_1_: [::std::mem::MaybeUninit<u8>; 2], } forward_declare::unsafe_define!(forward_declare::symbol!("Base2"), crate::Base2); -impl ctor::CtorNew<()> for Base2 { - type CtorType = impl ctor::Ctor<Output = Self>; +impl ::ctor::CtorNew<()> for Base2 { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: ()) -> Self::CtorType { let () = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { - crate::detail::__rust_thunk___ZN5Base2C1Ev( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), - ); + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { + crate::detail::__rust_thunk___ZN5Base2C1Ev(::std::pin::Pin::into_inner_unchecked( + dest, + )); }, ) } } -impl<'b> ctor::CtorNew<&'b crate::Base2> for Base2 { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<&'b crate::Base2> for Base2 { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: &'b crate::Base2) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN5Base2C1ERKS_( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), __param_0, ); }, ) } } -impl<'b> ctor::CtorNew<(&'b crate::Base2,)> for Base2 { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<(&'b crate::Base2,)> for Base2 { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: (&'b crate::Base2,)) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<&'b crate::Base2>>::ctor_new(arg) + <Self as ::ctor::CtorNew<&'b crate::Base2>>::ctor_new(arg) } } -impl<'b> ctor::CtorNew<ctor::RvalueReference<'b, crate::Base2>> for Base2 { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<::ctor::RvalueReference<'b, crate::Base2>> for Base2 { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] - fn ctor_new(args: ctor::RvalueReference<'b, crate::Base2>) -> Self::CtorType { + fn ctor_new(args: ::ctor::RvalueReference<'b, crate::Base2>) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN5Base2C1EOS_( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), __param_0, ); }, ) } } -impl<'b> ctor::CtorNew<(ctor::RvalueReference<'b, crate::Base2>,)> for Base2 { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<(::ctor::RvalueReference<'b, crate::Base2>,)> for Base2 { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] - fn ctor_new(args: (ctor::RvalueReference<'b, crate::Base2>,)) -> Self::CtorType { + fn ctor_new(args: (::ctor::RvalueReference<'b, crate::Base2>,)) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<ctor::RvalueReference<'b, crate::Base2>>>::ctor_new(arg) + <Self as ::ctor::CtorNew<::ctor::RvalueReference<'b, crate::Base2>>>::ctor_new(arg) } } impl<'b> ::ctor::Assign<&'b crate::Base2> for Base2 { #[inline(always)] - fn assign<'a>(self: crate::rust_std::pin::Pin<&'a mut Self>, __param_0: &'b crate::Base2) { + fn assign<'a>(self: ::std::pin::Pin<&'a mut Self>, __param_0: &'b crate::Base2) { unsafe { crate::detail::__rust_thunk___ZN5Base2aSERKS_(self, __param_0); } } } -impl<'b> ::ctor::Assign<ctor::RvalueReference<'b, crate::Base2>> for Base2 { +impl<'b> ::ctor::Assign<::ctor::RvalueReference<'b, crate::Base2>> for Base2 { #[inline(always)] fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, - __param_0: ctor::RvalueReference<'b, crate::Base2>, + self: ::std::pin::Pin<&'a mut Self>, + __param_0: ::ctor::RvalueReference<'b, crate::Base2>, ) { unsafe { crate::detail::__rust_thunk___ZN5Base2aSEOS_(self, __param_0); @@ -305,7 +303,7 @@ #[derive(Clone, Copy)] #[repr(C, align(8))] pub struct Derived { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 12], + __non_field_data: [::std::mem::MaybeUninit<u8>; 12], pub derived_1: u8, } forward_declare::unsafe_define!(forward_declare::symbol!("Derived"), crate::Derived); @@ -313,7 +311,7 @@ impl Default for Derived { #[inline(always)] fn default() -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN7DerivedC1Ev(&mut tmp); tmp.assume_init() @@ -321,10 +319,10 @@ } } -impl<'b> From<ctor::RvalueReference<'b, crate::Derived>> for Derived { +impl<'b> From<::ctor::RvalueReference<'b, crate::Derived>> for Derived { #[inline(always)] - fn from(__param_0: ctor::RvalueReference<'b, crate::Derived>) -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + fn from(__param_0: ::ctor::RvalueReference<'b, crate::Derived>) -> Self { + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN7DerivedC1EOS_(&mut tmp, __param_0); tmp.assume_init() @@ -356,93 +354,90 @@ } } -#[ctor::recursively_pinned] +#[::ctor::recursively_pinned] #[repr(C, align(8))] pub struct VirtualBase1 { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 24], + __non_field_data: [::std::mem::MaybeUninit<u8>; 24], } forward_declare::unsafe_define!(forward_declare::symbol!("VirtualBase1"), crate::VirtualBase1); -impl ctor::CtorNew<()> for VirtualBase1 { - type CtorType = impl ctor::Ctor<Output = Self>; +impl ::ctor::CtorNew<()> for VirtualBase1 { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: ()) -> Self::CtorType { let () = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN12VirtualBase1C1Ev( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), ); }, ) } } -impl<'b> ctor::CtorNew<&'b crate::VirtualBase1> for VirtualBase1 { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<&'b crate::VirtualBase1> for VirtualBase1 { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: &'b crate::VirtualBase1) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN12VirtualBase1C1ERKS_( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), __param_0, ); }, ) } } -impl<'b> ctor::CtorNew<(&'b crate::VirtualBase1,)> for VirtualBase1 { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<(&'b crate::VirtualBase1,)> for VirtualBase1 { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: (&'b crate::VirtualBase1,)) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<&'b crate::VirtualBase1>>::ctor_new(arg) + <Self as ::ctor::CtorNew<&'b crate::VirtualBase1>>::ctor_new(arg) } } -impl<'b> ctor::CtorNew<ctor::RvalueReference<'b, crate::VirtualBase1>> for VirtualBase1 { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<::ctor::RvalueReference<'b, crate::VirtualBase1>> for VirtualBase1 { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] - fn ctor_new(args: ctor::RvalueReference<'b, crate::VirtualBase1>) -> Self::CtorType { + fn ctor_new(args: ::ctor::RvalueReference<'b, crate::VirtualBase1>) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN12VirtualBase1C1EOS_( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), __param_0, ); }, ) } } -impl<'b> ctor::CtorNew<(ctor::RvalueReference<'b, crate::VirtualBase1>,)> for VirtualBase1 { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<(::ctor::RvalueReference<'b, crate::VirtualBase1>,)> for VirtualBase1 { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] - fn ctor_new(args: (ctor::RvalueReference<'b, crate::VirtualBase1>,)) -> Self::CtorType { + fn ctor_new(args: (::ctor::RvalueReference<'b, crate::VirtualBase1>,)) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<ctor::RvalueReference<'b, crate::VirtualBase1>>>::ctor_new(arg) + <Self as ::ctor::CtorNew<::ctor::RvalueReference<'b, crate::VirtualBase1>>>::ctor_new(arg) } } impl<'b> ::ctor::Assign<&'b crate::VirtualBase1> for VirtualBase1 { #[inline(always)] - fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, - __param_0: &'b crate::VirtualBase1, - ) { + fn assign<'a>(self: ::std::pin::Pin<&'a mut Self>, __param_0: &'b crate::VirtualBase1) { unsafe { crate::detail::__rust_thunk___ZN12VirtualBase1aSERKS_(self, __param_0); } } } -impl<'b> ::ctor::Assign<ctor::RvalueReference<'b, crate::VirtualBase1>> for VirtualBase1 { +impl<'b> ::ctor::Assign<::ctor::RvalueReference<'b, crate::VirtualBase1>> for VirtualBase1 { #[inline(always)] fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, - __param_0: ctor::RvalueReference<'b, crate::VirtualBase1>, + self: ::std::pin::Pin<&'a mut Self>, + __param_0: ::ctor::RvalueReference<'b, crate::VirtualBase1>, ) { unsafe { crate::detail::__rust_thunk___ZN12VirtualBase1aSEOS_(self, __param_0); @@ -456,93 +451,90 @@ } } -#[ctor::recursively_pinned] +#[::ctor::recursively_pinned] #[repr(C, align(8))] pub struct VirtualBase2 { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 24], + __non_field_data: [::std::mem::MaybeUninit<u8>; 24], } forward_declare::unsafe_define!(forward_declare::symbol!("VirtualBase2"), crate::VirtualBase2); -impl ctor::CtorNew<()> for VirtualBase2 { - type CtorType = impl ctor::Ctor<Output = Self>; +impl ::ctor::CtorNew<()> for VirtualBase2 { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: ()) -> Self::CtorType { let () = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN12VirtualBase2C1Ev( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), ); }, ) } } -impl<'b> ctor::CtorNew<&'b crate::VirtualBase2> for VirtualBase2 { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<&'b crate::VirtualBase2> for VirtualBase2 { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: &'b crate::VirtualBase2) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN12VirtualBase2C1ERKS_( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), __param_0, ); }, ) } } -impl<'b> ctor::CtorNew<(&'b crate::VirtualBase2,)> for VirtualBase2 { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<(&'b crate::VirtualBase2,)> for VirtualBase2 { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: (&'b crate::VirtualBase2,)) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<&'b crate::VirtualBase2>>::ctor_new(arg) + <Self as ::ctor::CtorNew<&'b crate::VirtualBase2>>::ctor_new(arg) } } -impl<'b> ctor::CtorNew<ctor::RvalueReference<'b, crate::VirtualBase2>> for VirtualBase2 { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<::ctor::RvalueReference<'b, crate::VirtualBase2>> for VirtualBase2 { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] - fn ctor_new(args: ctor::RvalueReference<'b, crate::VirtualBase2>) -> Self::CtorType { + fn ctor_new(args: ::ctor::RvalueReference<'b, crate::VirtualBase2>) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN12VirtualBase2C1EOS_( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), __param_0, ); }, ) } } -impl<'b> ctor::CtorNew<(ctor::RvalueReference<'b, crate::VirtualBase2>,)> for VirtualBase2 { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<(::ctor::RvalueReference<'b, crate::VirtualBase2>,)> for VirtualBase2 { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] - fn ctor_new(args: (ctor::RvalueReference<'b, crate::VirtualBase2>,)) -> Self::CtorType { + fn ctor_new(args: (::ctor::RvalueReference<'b, crate::VirtualBase2>,)) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<ctor::RvalueReference<'b, crate::VirtualBase2>>>::ctor_new(arg) + <Self as ::ctor::CtorNew<::ctor::RvalueReference<'b, crate::VirtualBase2>>>::ctor_new(arg) } } impl<'b> ::ctor::Assign<&'b crate::VirtualBase2> for VirtualBase2 { #[inline(always)] - fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, - __param_0: &'b crate::VirtualBase2, - ) { + fn assign<'a>(self: ::std::pin::Pin<&'a mut Self>, __param_0: &'b crate::VirtualBase2) { unsafe { crate::detail::__rust_thunk___ZN12VirtualBase2aSERKS_(self, __param_0); } } } -impl<'b> ::ctor::Assign<ctor::RvalueReference<'b, crate::VirtualBase2>> for VirtualBase2 { +impl<'b> ::ctor::Assign<::ctor::RvalueReference<'b, crate::VirtualBase2>> for VirtualBase2 { #[inline(always)] fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, - __param_0: ctor::RvalueReference<'b, crate::VirtualBase2>, + self: ::std::pin::Pin<&'a mut Self>, + __param_0: ::ctor::RvalueReference<'b, crate::VirtualBase2>, ) { unsafe { crate::detail::__rust_thunk___ZN12VirtualBase2aSEOS_(self, __param_0); @@ -556,93 +548,90 @@ } } -#[ctor::recursively_pinned] +#[::ctor::recursively_pinned] #[repr(C, align(8))] pub struct VirtualDerived { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 32], + __non_field_data: [::std::mem::MaybeUninit<u8>; 32], } forward_declare::unsafe_define!(forward_declare::symbol!("VirtualDerived"), crate::VirtualDerived); -impl ctor::CtorNew<()> for VirtualDerived { - type CtorType = impl ctor::Ctor<Output = Self>; +impl ::ctor::CtorNew<()> for VirtualDerived { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: ()) -> Self::CtorType { let () = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN14VirtualDerivedC1Ev( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), ); }, ) } } -impl<'b> ctor::CtorNew<&'b crate::VirtualDerived> for VirtualDerived { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<&'b crate::VirtualDerived> for VirtualDerived { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: &'b crate::VirtualDerived) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN14VirtualDerivedC1ERKS_( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), __param_0, ); }, ) } } -impl<'b> ctor::CtorNew<(&'b crate::VirtualDerived,)> for VirtualDerived { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<(&'b crate::VirtualDerived,)> for VirtualDerived { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: (&'b crate::VirtualDerived,)) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<&'b crate::VirtualDerived>>::ctor_new(arg) + <Self as ::ctor::CtorNew<&'b crate::VirtualDerived>>::ctor_new(arg) } } -impl<'b> ctor::CtorNew<ctor::RvalueReference<'b, crate::VirtualDerived>> for VirtualDerived { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<::ctor::RvalueReference<'b, crate::VirtualDerived>> for VirtualDerived { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] - fn ctor_new(args: ctor::RvalueReference<'b, crate::VirtualDerived>) -> Self::CtorType { + fn ctor_new(args: ::ctor::RvalueReference<'b, crate::VirtualDerived>) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN14VirtualDerivedC1EOS_( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), __param_0, ); }, ) } } -impl<'b> ctor::CtorNew<(ctor::RvalueReference<'b, crate::VirtualDerived>,)> for VirtualDerived { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<(::ctor::RvalueReference<'b, crate::VirtualDerived>,)> for VirtualDerived { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] - fn ctor_new(args: (ctor::RvalueReference<'b, crate::VirtualDerived>,)) -> Self::CtorType { + fn ctor_new(args: (::ctor::RvalueReference<'b, crate::VirtualDerived>,)) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<ctor::RvalueReference<'b, crate::VirtualDerived>>>::ctor_new(arg) + <Self as ::ctor::CtorNew<::ctor::RvalueReference<'b, crate::VirtualDerived>>>::ctor_new(arg) } } impl<'b> ::ctor::Assign<&'b crate::VirtualDerived> for VirtualDerived { #[inline(always)] - fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, - __param_0: &'b crate::VirtualDerived, - ) { + fn assign<'a>(self: ::std::pin::Pin<&'a mut Self>, __param_0: &'b crate::VirtualDerived) { unsafe { crate::detail::__rust_thunk___ZN14VirtualDerivedaSERKS_(self, __param_0); } } } -impl<'b> ::ctor::Assign<ctor::RvalueReference<'b, crate::VirtualDerived>> for VirtualDerived { +impl<'b> ::ctor::Assign<::ctor::RvalueReference<'b, crate::VirtualDerived>> for VirtualDerived { #[inline(always)] fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, - __param_0: ctor::RvalueReference<'b, crate::VirtualDerived>, + self: ::std::pin::Pin<&'a mut Self>, + __param_0: ::ctor::RvalueReference<'b, crate::VirtualDerived>, ) { unsafe { crate::detail::__rust_thunk___ZN14VirtualDerivedaSEOS_(self, __param_0); @@ -677,132 +666,132 @@ use super::*; extern "C" { pub(crate) fn __rust_thunk___ZN5Base0C1Ev<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::Base0>, + __this: &'a mut ::std::mem::MaybeUninit<crate::Base0>, ); pub(crate) fn __rust_thunk___ZN5Base0C1ERKS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::Base0>, + __this: &'a mut ::std::mem::MaybeUninit<crate::Base0>, __param_0: &'b crate::Base0, ); pub(crate) fn __rust_thunk___ZN5Base0C1EOS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::Base0>, - __param_0: ctor::RvalueReference<'b, crate::Base0>, + __this: &'a mut ::std::mem::MaybeUninit<crate::Base0>, + __param_0: ::ctor::RvalueReference<'b, crate::Base0>, ); pub(crate) fn __rust_thunk___ZN5Base0aSERKS_<'a, 'b>( - __this: crate::rust_std::pin::Pin<&'a mut crate::Base0>, + __this: ::std::pin::Pin<&'a mut crate::Base0>, __param_0: &'b crate::Base0, - ) -> crate::rust_std::pin::Pin<&'a mut crate::Base0>; + ) -> ::std::pin::Pin<&'a mut crate::Base0>; pub(crate) fn __rust_thunk___ZN5Base0aSEOS_<'a, 'b>( - __this: crate::rust_std::pin::Pin<&'a mut crate::Base0>, - __param_0: ctor::RvalueReference<'b, crate::Base0>, - ) -> crate::rust_std::pin::Pin<&'a mut crate::Base0>; + __this: ::std::pin::Pin<&'a mut crate::Base0>, + __param_0: ::ctor::RvalueReference<'b, crate::Base0>, + ) -> ::std::pin::Pin<&'a mut crate::Base0>; pub(crate) fn __rust_thunk___ZN5Base1C1Ev<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::Base1>, + __this: &'a mut ::std::mem::MaybeUninit<crate::Base1>, ); pub(crate) fn __rust_thunk___ZN5Base1C1ERKS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::Base1>, + __this: &'a mut ::std::mem::MaybeUninit<crate::Base1>, __param_0: &'b crate::Base1, ); pub(crate) fn __rust_thunk___ZN5Base1C1EOS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::Base1>, - __param_0: ctor::RvalueReference<'b, crate::Base1>, + __this: &'a mut ::std::mem::MaybeUninit<crate::Base1>, + __param_0: ::ctor::RvalueReference<'b, crate::Base1>, ); pub(crate) fn __rust_thunk___ZN5Base1aSERKS_<'a, 'b>( - __this: crate::rust_std::pin::Pin<&'a mut crate::Base1>, + __this: ::std::pin::Pin<&'a mut crate::Base1>, __param_0: &'b crate::Base1, - ) -> crate::rust_std::pin::Pin<&'a mut crate::Base1>; + ) -> ::std::pin::Pin<&'a mut crate::Base1>; pub(crate) fn __rust_thunk___ZN5Base1aSEOS_<'a, 'b>( - __this: crate::rust_std::pin::Pin<&'a mut crate::Base1>, - __param_0: ctor::RvalueReference<'b, crate::Base1>, - ) -> crate::rust_std::pin::Pin<&'a mut crate::Base1>; + __this: ::std::pin::Pin<&'a mut crate::Base1>, + __param_0: ::ctor::RvalueReference<'b, crate::Base1>, + ) -> ::std::pin::Pin<&'a mut crate::Base1>; pub(crate) fn __rust_thunk___ZN5Base2C1Ev<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::Base2>, + __this: &'a mut ::std::mem::MaybeUninit<crate::Base2>, ); pub(crate) fn __rust_thunk___ZN5Base2C1ERKS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::Base2>, + __this: &'a mut ::std::mem::MaybeUninit<crate::Base2>, __param_0: &'b crate::Base2, ); pub(crate) fn __rust_thunk___ZN5Base2C1EOS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::Base2>, - __param_0: ctor::RvalueReference<'b, crate::Base2>, + __this: &'a mut ::std::mem::MaybeUninit<crate::Base2>, + __param_0: ::ctor::RvalueReference<'b, crate::Base2>, ); pub(crate) fn __rust_thunk___ZN5Base2aSERKS_<'a, 'b>( - __this: crate::rust_std::pin::Pin<&'a mut crate::Base2>, + __this: ::std::pin::Pin<&'a mut crate::Base2>, __param_0: &'b crate::Base2, - ) -> crate::rust_std::pin::Pin<&'a mut crate::Base2>; + ) -> ::std::pin::Pin<&'a mut crate::Base2>; pub(crate) fn __rust_thunk___ZN5Base2aSEOS_<'a, 'b>( - __this: crate::rust_std::pin::Pin<&'a mut crate::Base2>, - __param_0: ctor::RvalueReference<'b, crate::Base2>, - ) -> crate::rust_std::pin::Pin<&'a mut crate::Base2>; + __this: ::std::pin::Pin<&'a mut crate::Base2>, + __param_0: ::ctor::RvalueReference<'b, crate::Base2>, + ) -> ::std::pin::Pin<&'a mut crate::Base2>; pub(crate) fn __rust_thunk___ZN7DerivedC1Ev<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::Derived>, + __this: &'a mut ::std::mem::MaybeUninit<crate::Derived>, ); pub(crate) fn __rust_thunk___ZN7DerivedC1EOS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::Derived>, - __param_0: ctor::RvalueReference<'b, crate::Derived>, + __this: &'a mut ::std::mem::MaybeUninit<crate::Derived>, + __param_0: ::ctor::RvalueReference<'b, crate::Derived>, ); pub(crate) fn __rust_thunk___ZN12VirtualBase1C1Ev<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::VirtualBase1>, + __this: &'a mut ::std::mem::MaybeUninit<crate::VirtualBase1>, ); pub(crate) fn __rust_thunk___ZN12VirtualBase1C1ERKS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::VirtualBase1>, + __this: &'a mut ::std::mem::MaybeUninit<crate::VirtualBase1>, __param_0: &'b crate::VirtualBase1, ); pub(crate) fn __rust_thunk___ZN12VirtualBase1C1EOS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::VirtualBase1>, - __param_0: ctor::RvalueReference<'b, crate::VirtualBase1>, + __this: &'a mut ::std::mem::MaybeUninit<crate::VirtualBase1>, + __param_0: ::ctor::RvalueReference<'b, crate::VirtualBase1>, ); pub(crate) fn __rust_thunk___ZN12VirtualBase1aSERKS_<'a, 'b>( - __this: crate::rust_std::pin::Pin<&'a mut crate::VirtualBase1>, + __this: ::std::pin::Pin<&'a mut crate::VirtualBase1>, __param_0: &'b crate::VirtualBase1, - ) -> crate::rust_std::pin::Pin<&'a mut crate::VirtualBase1>; + ) -> ::std::pin::Pin<&'a mut crate::VirtualBase1>; pub(crate) fn __rust_thunk___ZN12VirtualBase1aSEOS_<'a, 'b>( - __this: crate::rust_std::pin::Pin<&'a mut crate::VirtualBase1>, - __param_0: ctor::RvalueReference<'b, crate::VirtualBase1>, - ) -> crate::rust_std::pin::Pin<&'a mut crate::VirtualBase1>; + __this: ::std::pin::Pin<&'a mut crate::VirtualBase1>, + __param_0: ::ctor::RvalueReference<'b, crate::VirtualBase1>, + ) -> ::std::pin::Pin<&'a mut crate::VirtualBase1>; pub fn __crubit_dynamic_upcast__VirtualBase1__to__Base1( from: *const VirtualBase1, ) -> *const crate::Base1; pub(crate) fn __rust_thunk___ZN12VirtualBase2C1Ev<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::VirtualBase2>, + __this: &'a mut ::std::mem::MaybeUninit<crate::VirtualBase2>, ); pub(crate) fn __rust_thunk___ZN12VirtualBase2C1ERKS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::VirtualBase2>, + __this: &'a mut ::std::mem::MaybeUninit<crate::VirtualBase2>, __param_0: &'b crate::VirtualBase2, ); pub(crate) fn __rust_thunk___ZN12VirtualBase2C1EOS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::VirtualBase2>, - __param_0: ctor::RvalueReference<'b, crate::VirtualBase2>, + __this: &'a mut ::std::mem::MaybeUninit<crate::VirtualBase2>, + __param_0: ::ctor::RvalueReference<'b, crate::VirtualBase2>, ); pub(crate) fn __rust_thunk___ZN12VirtualBase2aSERKS_<'a, 'b>( - __this: crate::rust_std::pin::Pin<&'a mut crate::VirtualBase2>, + __this: ::std::pin::Pin<&'a mut crate::VirtualBase2>, __param_0: &'b crate::VirtualBase2, - ) -> crate::rust_std::pin::Pin<&'a mut crate::VirtualBase2>; + ) -> ::std::pin::Pin<&'a mut crate::VirtualBase2>; pub(crate) fn __rust_thunk___ZN12VirtualBase2aSEOS_<'a, 'b>( - __this: crate::rust_std::pin::Pin<&'a mut crate::VirtualBase2>, - __param_0: ctor::RvalueReference<'b, crate::VirtualBase2>, - ) -> crate::rust_std::pin::Pin<&'a mut crate::VirtualBase2>; + __this: ::std::pin::Pin<&'a mut crate::VirtualBase2>, + __param_0: ::ctor::RvalueReference<'b, crate::VirtualBase2>, + ) -> ::std::pin::Pin<&'a mut crate::VirtualBase2>; pub fn __crubit_dynamic_upcast__VirtualBase2__to__Base1( from: *const VirtualBase2, ) -> *const crate::Base1; pub(crate) fn __rust_thunk___ZN14VirtualDerivedC1Ev<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::VirtualDerived>, + __this: &'a mut ::std::mem::MaybeUninit<crate::VirtualDerived>, ); pub(crate) fn __rust_thunk___ZN14VirtualDerivedC1ERKS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::VirtualDerived>, + __this: &'a mut ::std::mem::MaybeUninit<crate::VirtualDerived>, __param_0: &'b crate::VirtualDerived, ); pub(crate) fn __rust_thunk___ZN14VirtualDerivedC1EOS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::VirtualDerived>, - __param_0: ctor::RvalueReference<'b, crate::VirtualDerived>, + __this: &'a mut ::std::mem::MaybeUninit<crate::VirtualDerived>, + __param_0: ::ctor::RvalueReference<'b, crate::VirtualDerived>, ); pub(crate) fn __rust_thunk___ZN14VirtualDerivedaSERKS_<'a, 'b>( - __this: crate::rust_std::pin::Pin<&'a mut crate::VirtualDerived>, + __this: ::std::pin::Pin<&'a mut crate::VirtualDerived>, __param_0: &'b crate::VirtualDerived, - ) -> crate::rust_std::pin::Pin<&'a mut crate::VirtualDerived>; + ) -> ::std::pin::Pin<&'a mut crate::VirtualDerived>; pub(crate) fn __rust_thunk___ZN14VirtualDerivedaSEOS_<'a, 'b>( - __this: crate::rust_std::pin::Pin<&'a mut crate::VirtualDerived>, - __param_0: ctor::RvalueReference<'b, crate::VirtualDerived>, - ) -> crate::rust_std::pin::Pin<&'a mut crate::VirtualDerived>; + __this: ::std::pin::Pin<&'a mut crate::VirtualDerived>, + __param_0: ::ctor::RvalueReference<'b, crate::VirtualDerived>, + ) -> ::std::pin::Pin<&'a mut crate::VirtualDerived>; pub fn __crubit_dynamic_upcast__VirtualDerived__to__VirtualBase1( from: *const VirtualDerived, ) -> *const crate::VirtualBase1; @@ -815,10 +804,10 @@ } } -const _: () = assert!(rust_std::mem::size_of::<Option<&i32>>() == rust_std::mem::size_of::<&i32>()); +const _: () = assert!(::std::mem::size_of::<Option<&i32>>() == ::std::mem::size_of::<&i32>()); -const _: () = assert!(rust_std::mem::size_of::<crate::Base0>() == 1); -const _: () = assert!(rust_std::mem::align_of::<crate::Base0>() == 1); +const _: () = assert!(::std::mem::size_of::<crate::Base0>() == 1); +const _: () = assert!(::std::mem::align_of::<crate::Base0>() == 1); const _: () = { static_assertions::assert_not_impl_any!(crate::Base0: Copy); }; @@ -826,8 +815,8 @@ static_assertions::assert_not_impl_any!(crate::Base0: Drop); }; -const _: () = assert!(rust_std::mem::size_of::<crate::Base1>() == 16); -const _: () = assert!(rust_std::mem::align_of::<crate::Base1>() == 8); +const _: () = assert!(::std::mem::size_of::<crate::Base1>() == 16); +const _: () = assert!(::std::mem::align_of::<crate::Base1>() == 8); const _: () = { static_assertions::assert_not_impl_any!(crate::Base1: Copy); }; @@ -837,8 +826,8 @@ const _: () = assert!(memoffset_unstable_const::offset_of!(crate::Base1, b1_1_) == 0); const _: () = assert!(memoffset_unstable_const::offset_of!(crate::Base1, b1_2_) == 8); -const _: () = assert!(rust_std::mem::size_of::<crate::Base2>() == 2); -const _: () = assert!(rust_std::mem::align_of::<crate::Base2>() == 2); +const _: () = assert!(::std::mem::size_of::<crate::Base2>() == 2); +const _: () = assert!(::std::mem::align_of::<crate::Base2>() == 2); const _: () = { static_assertions::assert_not_impl_any!(crate::Base2: Copy); }; @@ -847,8 +836,8 @@ }; const _: () = assert!(memoffset_unstable_const::offset_of!(crate::Base2, b2_1_) == 0); -const _: () = assert!(rust_std::mem::size_of::<crate::Derived>() == 16); -const _: () = assert!(rust_std::mem::align_of::<crate::Derived>() == 8); +const _: () = assert!(::std::mem::size_of::<crate::Derived>() == 16); +const _: () = assert!(::std::mem::align_of::<crate::Derived>() == 8); const _: () = { static_assertions::assert_impl_all!(crate::Derived: Clone); }; @@ -860,8 +849,8 @@ }; const _: () = assert!(memoffset_unstable_const::offset_of!(crate::Derived, derived_1) == 12); -const _: () = assert!(rust_std::mem::size_of::<crate::VirtualBase1>() == 24); -const _: () = assert!(rust_std::mem::align_of::<crate::VirtualBase1>() == 8); +const _: () = assert!(::std::mem::size_of::<crate::VirtualBase1>() == 24); +const _: () = assert!(::std::mem::align_of::<crate::VirtualBase1>() == 8); const _: () = { static_assertions::assert_not_impl_any!(crate::VirtualBase1: Copy); }; @@ -869,8 +858,8 @@ static_assertions::assert_not_impl_any!(crate::VirtualBase1: Drop); }; -const _: () = assert!(rust_std::mem::size_of::<crate::VirtualBase2>() == 24); -const _: () = assert!(rust_std::mem::align_of::<crate::VirtualBase2>() == 8); +const _: () = assert!(::std::mem::size_of::<crate::VirtualBase2>() == 24); +const _: () = assert!(::std::mem::align_of::<crate::VirtualBase2>() == 8); const _: () = { static_assertions::assert_not_impl_any!(crate::VirtualBase2: Copy); }; @@ -878,8 +867,8 @@ static_assertions::assert_not_impl_any!(crate::VirtualBase2: Drop); }; -const _: () = assert!(rust_std::mem::size_of::<crate::VirtualDerived>() == 32); -const _: () = assert!(rust_std::mem::align_of::<crate::VirtualDerived>() == 8); +const _: () = assert!(::std::mem::size_of::<crate::VirtualDerived>() == 32); +const _: () = assert!(::std::mem::align_of::<crate::VirtualDerived>() == 8); const _: () = { static_assertions::assert_not_impl_any!(crate::VirtualDerived: Copy); };
diff --git a/rs_bindings_from_cc/test/golden/item_order_rs_api.rs b/rs_bindings_from_cc/test/golden/item_order_rs_api.rs index 38edada..1c1829c 100644 --- a/rs_bindings_from_cc/test/golden/item_order_rs_api.rs +++ b/rs_bindings_from_cc/test/golden/item_order_rs_api.rs
@@ -11,8 +11,6 @@ #![allow(non_upper_case_globals)] #![deny(warnings)] -use ::std as rust_std; - // Part of the Crubit project, under the Apache License v2.0 with LLVM // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception @@ -27,7 +25,7 @@ impl Default for FirstStruct { #[inline(always)] fn default() -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN11FirstStructC1Ev(&mut tmp); tmp.assume_init() @@ -35,10 +33,10 @@ } } -impl<'b> From<ctor::RvalueReference<'b, crate::FirstStruct>> for FirstStruct { +impl<'b> From<::ctor::RvalueReference<'b, crate::FirstStruct>> for FirstStruct { #[inline(always)] - fn from(__param_0: ctor::RvalueReference<'b, crate::FirstStruct>) -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + fn from(__param_0: ::ctor::RvalueReference<'b, crate::FirstStruct>) -> Self { + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN11FirstStructC1EOS_(&mut tmp, __param_0); tmp.assume_init() @@ -69,7 +67,7 @@ impl Default for SecondStruct { #[inline(always)] fn default() -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN12SecondStructC1Ev(&mut tmp); tmp.assume_init() @@ -77,10 +75,10 @@ } } -impl<'b> From<ctor::RvalueReference<'b, crate::SecondStruct>> for SecondStruct { +impl<'b> From<::ctor::RvalueReference<'b, crate::SecondStruct>> for SecondStruct { #[inline(always)] - fn from(__param_0: ctor::RvalueReference<'b, crate::SecondStruct>) -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + fn from(__param_0: ::ctor::RvalueReference<'b, crate::SecondStruct>) -> Self { + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN12SecondStructC1EOS_(&mut tmp, __param_0); tmp.assume_init() @@ -108,28 +106,28 @@ use super::*; extern "C" { pub(crate) fn __rust_thunk___ZN11FirstStructC1Ev<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::FirstStruct>, + __this: &'a mut ::std::mem::MaybeUninit<crate::FirstStruct>, ); pub(crate) fn __rust_thunk___ZN11FirstStructC1EOS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::FirstStruct>, - __param_0: ctor::RvalueReference<'b, crate::FirstStruct>, + __this: &'a mut ::std::mem::MaybeUninit<crate::FirstStruct>, + __param_0: ::ctor::RvalueReference<'b, crate::FirstStruct>, ); pub(crate) fn __rust_thunk___Z10first_funcv() -> i32; pub(crate) fn __rust_thunk___ZN12SecondStructC1Ev<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::SecondStruct>, + __this: &'a mut ::std::mem::MaybeUninit<crate::SecondStruct>, ); pub(crate) fn __rust_thunk___ZN12SecondStructC1EOS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::SecondStruct>, - __param_0: ctor::RvalueReference<'b, crate::SecondStruct>, + __this: &'a mut ::std::mem::MaybeUninit<crate::SecondStruct>, + __param_0: ::ctor::RvalueReference<'b, crate::SecondStruct>, ); pub(crate) fn __rust_thunk___Z11second_funcv() -> i32; } } -const _: () = assert!(rust_std::mem::size_of::<Option<&i32>>() == rust_std::mem::size_of::<&i32>()); +const _: () = assert!(::std::mem::size_of::<Option<&i32>>() == ::std::mem::size_of::<&i32>()); -const _: () = assert!(rust_std::mem::size_of::<crate::FirstStruct>() == 4); -const _: () = assert!(rust_std::mem::align_of::<crate::FirstStruct>() == 4); +const _: () = assert!(::std::mem::size_of::<crate::FirstStruct>() == 4); +const _: () = assert!(::std::mem::align_of::<crate::FirstStruct>() == 4); const _: () = { static_assertions::assert_impl_all!(crate::FirstStruct: Clone); }; @@ -141,8 +139,8 @@ }; const _: () = assert!(memoffset_unstable_const::offset_of!(crate::FirstStruct, field) == 0); -const _: () = assert!(rust_std::mem::size_of::<crate::SecondStruct>() == 4); -const _: () = assert!(rust_std::mem::align_of::<crate::SecondStruct>() == 4); +const _: () = assert!(::std::mem::size_of::<crate::SecondStruct>() == 4); +const _: () = assert!(::std::mem::align_of::<crate::SecondStruct>() == 4); const _: () = { static_assertions::assert_impl_all!(crate::SecondStruct: Clone); };
diff --git a/rs_bindings_from_cc/test/golden/lifetimes_rs_api.rs b/rs_bindings_from_cc/test/golden/lifetimes_rs_api.rs index b787b2e..a03ab52 100644 --- a/rs_bindings_from_cc/test/golden/lifetimes_rs_api.rs +++ b/rs_bindings_from_cc/test/golden/lifetimes_rs_api.rs
@@ -11,8 +11,6 @@ #![allow(non_upper_case_globals)] #![deny(warnings)] -use ::std as rust_std; - // Part of the Crubit project, under the Apache License v2.0 with LLVM // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception @@ -76,4 +74,4 @@ } } -const _: () = assert!(rust_std::mem::size_of::<Option<&i32>>() == rust_std::mem::size_of::<&i32>()); +const _: () = assert!(::std::mem::size_of::<Option<&i32>>() == ::std::mem::size_of::<&i32>());
diff --git a/rs_bindings_from_cc/test/golden/namespace_rs_api.rs b/rs_bindings_from_cc/test/golden/namespace_rs_api.rs index c87104a..b359999 100644 --- a/rs_bindings_from_cc/test/golden/namespace_rs_api.rs +++ b/rs_bindings_from_cc/test/golden/namespace_rs_api.rs
@@ -11,14 +11,12 @@ #![allow(non_upper_case_globals)] #![deny(warnings)] -use ::std as rust_std; - // Part of the Crubit project, under the Apache License v2.0 with LLVM // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception pub mod test_namespace_bindings { - #[ctor::recursively_pinned] + #[::ctor::recursively_pinned] #[repr(C)] pub struct S { pub i: i32, @@ -32,70 +30,64 @@ // Error while generating bindings for item 'S::S': // Cannot generate bindings for overloaded function - impl<'b> ctor::CtorNew<&'b crate::test_namespace_bindings::S> for S { - type CtorType = impl ctor::Ctor<Output = Self>; + impl<'b> ::ctor::CtorNew<&'b crate::test_namespace_bindings::S> for S { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: &'b crate::test_namespace_bindings::S) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin< - &mut crate::rust_std::mem::MaybeUninit<Self>, - >| { - unsafe { - crate::detail::__rust_thunk___ZN23test_namespace_bindings1SC1ERKS0_( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), - __param_0, - ); - } + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { + crate::detail::__rust_thunk___ZN23test_namespace_bindings1SC1ERKS0_( + ::std::pin::Pin::into_inner_unchecked(dest), + __param_0, + ); }, ) } } - impl<'b> ctor::CtorNew<(&'b crate::test_namespace_bindings::S,)> for S { - type CtorType = impl ctor::Ctor<Output = Self>; + impl<'b> ::ctor::CtorNew<(&'b crate::test_namespace_bindings::S,)> for S { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: (&'b crate::test_namespace_bindings::S,)) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<&'b crate::test_namespace_bindings::S>>::ctor_new(arg) + <Self as ::ctor::CtorNew<&'b crate::test_namespace_bindings::S>>::ctor_new(arg) } } - impl<'b> ctor::CtorNew<ctor::RvalueReference<'b, crate::test_namespace_bindings::S>> for S { - type CtorType = impl ctor::Ctor<Output = Self>; + impl<'b> ::ctor::CtorNew<::ctor::RvalueReference<'b, crate::test_namespace_bindings::S>> for S { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new( - args: ctor::RvalueReference<'b, crate::test_namespace_bindings::S>, + args: ::ctor::RvalueReference<'b, crate::test_namespace_bindings::S>, ) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin< - &mut crate::rust_std::mem::MaybeUninit<Self>, - >| { - unsafe { - crate::detail::__rust_thunk___ZN23test_namespace_bindings1SC1EOS0_( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), - __param_0, - ); - } + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { + crate::detail::__rust_thunk___ZN23test_namespace_bindings1SC1EOS0_( + ::std::pin::Pin::into_inner_unchecked(dest), + __param_0, + ); }, ) } } - impl<'b> ctor::CtorNew<(ctor::RvalueReference<'b, crate::test_namespace_bindings::S>,)> for S { - type CtorType = impl ctor::Ctor<Output = Self>; + impl<'b> ::ctor::CtorNew<(::ctor::RvalueReference<'b, crate::test_namespace_bindings::S>,)> for S { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new( - args: (ctor::RvalueReference<'b, crate::test_namespace_bindings::S>,), + args: (::ctor::RvalueReference<'b, crate::test_namespace_bindings::S>,), ) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<ctor::RvalueReference<'b,crate::test_namespace_bindings::S>>>::ctor_new(arg) + <Self as ::ctor::CtorNew< + ::ctor::RvalueReference<'b, crate::test_namespace_bindings::S>, + >>::ctor_new(arg) } } impl<'b> ::ctor::Assign<&'b crate::test_namespace_bindings::S> for S { #[inline(always)] fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, + self: ::std::pin::Pin<&'a mut Self>, __param_0: &'b crate::test_namespace_bindings::S, ) { unsafe { @@ -106,11 +98,11 @@ } } - impl<'b> ::ctor::Assign<ctor::RvalueReference<'b, crate::test_namespace_bindings::S>> for S { + impl<'b> ::ctor::Assign<::ctor::RvalueReference<'b, crate::test_namespace_bindings::S>> for S { #[inline(always)] fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, - __param_0: ctor::RvalueReference<'b, crate::test_namespace_bindings::S>, + self: ::std::pin::Pin<&'a mut Self>, + __param_0: ::ctor::RvalueReference<'b, crate::test_namespace_bindings::S>, ) { unsafe { crate::detail::__rust_thunk___ZN23test_namespace_bindings1SaSEOS0_(self, __param_0); @@ -153,10 +145,10 @@ } pub mod inner_0 { - #[ctor::recursively_pinned] + #[::ctor::recursively_pinned] #[repr(C)] pub struct S { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 1], + __non_field_data: [::std::mem::MaybeUninit<u8>; 1], } forward_declare::unsafe_define!( forward_declare::symbol!("S"), @@ -167,72 +159,67 @@ // Error while generating bindings for item 'S::S': // Cannot generate bindings for overloaded function - impl<'b> ctor::CtorNew<&'b crate::test_namespace_bindings_reopened::inner::S> for S { - type CtorType = impl ctor::Ctor<Output = Self>; + impl<'b> ::ctor::CtorNew<&'b crate::test_namespace_bindings_reopened::inner::S> for S { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new( args: &'b crate::test_namespace_bindings_reopened::inner::S, ) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin< - &mut crate::rust_std::mem::MaybeUninit<Self>, - >| { - unsafe { - crate::detail::__rust_thunk___ZN32test_namespace_bindings_reopened5inner1SC1ERKS1_(crate::rust_std::pin::Pin::into_inner_unchecked(dest),__param_0); - } + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { + crate::detail::__rust_thunk___ZN32test_namespace_bindings_reopened5inner1SC1ERKS1_(::std::pin::Pin::into_inner_unchecked(dest),__param_0); }, ) } } - impl<'b> ctor::CtorNew<(&'b crate::test_namespace_bindings_reopened::inner::S,)> for S { - type CtorType = impl ctor::Ctor<Output = Self>; + impl<'b> ::ctor::CtorNew<(&'b crate::test_namespace_bindings_reopened::inner::S,)> for S { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new( args: (&'b crate::test_namespace_bindings_reopened::inner::S,), ) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<&'b crate::test_namespace_bindings_reopened::inner::S>>::ctor_new(arg) + <Self as::ctor::CtorNew<&'b crate::test_namespace_bindings_reopened::inner::S>>::ctor_new(arg) } } impl<'b> - ctor::CtorNew< - ctor::RvalueReference<'b, crate::test_namespace_bindings_reopened::inner::S>, + ::ctor::CtorNew< + ::ctor::RvalueReference<'b, crate::test_namespace_bindings_reopened::inner::S>, > for S { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new( - args: ctor::RvalueReference<'b, crate::test_namespace_bindings_reopened::inner::S>, + args: ::ctor::RvalueReference< + 'b, + crate::test_namespace_bindings_reopened::inner::S, + >, ) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin< - &mut crate::rust_std::mem::MaybeUninit<Self>, - >| { - unsafe { - crate::detail::__rust_thunk___ZN32test_namespace_bindings_reopened5inner1SC1EOS1_(crate::rust_std::pin::Pin::into_inner_unchecked(dest),__param_0); - } + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { + crate::detail::__rust_thunk___ZN32test_namespace_bindings_reopened5inner1SC1EOS1_(::std::pin::Pin::into_inner_unchecked(dest),__param_0); }, ) } } impl<'b> - ctor::CtorNew<( - ctor::RvalueReference<'b, crate::test_namespace_bindings_reopened::inner::S>, + ::ctor::CtorNew<( + ::ctor::RvalueReference<'b, crate::test_namespace_bindings_reopened::inner::S>, )> for S { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new( args: ( - ctor::RvalueReference<'b, crate::test_namespace_bindings_reopened::inner::S>, + ::ctor::RvalueReference<'b, crate::test_namespace_bindings_reopened::inner::S>, ), ) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew< - ctor::RvalueReference<'b, crate::test_namespace_bindings_reopened::inner::S>, + <Self as ::ctor::CtorNew< + ::ctor::RvalueReference<'b, crate::test_namespace_bindings_reopened::inner::S>, >>::ctor_new(arg) } } @@ -240,7 +227,7 @@ impl<'b> ::ctor::Assign<&'b crate::test_namespace_bindings_reopened::inner::S> for S { #[inline(always)] fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, + self: ::std::pin::Pin<&'a mut Self>, __param_0: &'b crate::test_namespace_bindings_reopened::inner::S, ) { unsafe { @@ -251,13 +238,13 @@ impl<'b> ::ctor::Assign< - ctor::RvalueReference<'b, crate::test_namespace_bindings_reopened::inner::S>, + ::ctor::RvalueReference<'b, crate::test_namespace_bindings_reopened::inner::S>, > for S { #[inline(always)] fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, - __param_0: ctor::RvalueReference< + self: ::std::pin::Pin<&'a mut Self>, + __param_0: ::ctor::RvalueReference< 'b, crate::test_namespace_bindings_reopened::inner::S, >, @@ -302,120 +289,109 @@ pub mod test_namespace_bindings_inline { pub mod inner { - #[ctor::recursively_pinned] + #[::ctor::recursively_pinned] #[repr(C)] pub struct StructInInlineNamespace { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 1], + __non_field_data: [::std::mem::MaybeUninit<u8>; 1], } forward_declare::unsafe_define!( forward_declare::symbol!("StructInInlineNamespace"), crate::test_namespace_bindings_inline::inner::StructInInlineNamespace ); - impl ctor::CtorNew<()> for StructInInlineNamespace { - type CtorType = impl ctor::Ctor<Output = Self>; + impl ::ctor::CtorNew<()> for StructInInlineNamespace { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: ()) -> Self::CtorType { let () = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin< - &mut crate::rust_std::mem::MaybeUninit<Self>, - >| { - unsafe { - crate::detail::__rust_thunk___ZN30test_namespace_bindings_inline5inner23StructInInlineNamespaceC1Ev(crate::rust_std::pin::Pin::into_inner_unchecked(dest)); - } + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { + crate::detail::__rust_thunk___ZN30test_namespace_bindings_inline5inner23StructInInlineNamespaceC1Ev(::std::pin::Pin::into_inner_unchecked(dest)); }, ) } } impl<'b> - ctor::CtorNew<&'b crate::test_namespace_bindings_inline::inner::StructInInlineNamespace> - for StructInInlineNamespace + ::ctor::CtorNew< + &'b crate::test_namespace_bindings_inline::inner::StructInInlineNamespace, + > for StructInInlineNamespace { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new( args: &'b crate::test_namespace_bindings_inline::inner::StructInInlineNamespace, ) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin< - &mut crate::rust_std::mem::MaybeUninit<Self>, - >| { - unsafe { - crate::detail::__rust_thunk___ZN30test_namespace_bindings_inline5inner23StructInInlineNamespaceC1ERKS1_(crate::rust_std::pin::Pin::into_inner_unchecked(dest),__param_0); - } + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { + crate::detail::__rust_thunk___ZN30test_namespace_bindings_inline5inner23StructInInlineNamespaceC1ERKS1_(::std::pin::Pin::into_inner_unchecked(dest),__param_0); }, ) } } impl<'b> - ctor::CtorNew<( + ::ctor::CtorNew<( &'b crate::test_namespace_bindings_inline::inner::StructInInlineNamespace, )> for StructInInlineNamespace { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new( args: (&'b crate::test_namespace_bindings_inline::inner::StructInInlineNamespace,), ) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew< + <Self as ::ctor::CtorNew< &'b crate::test_namespace_bindings_inline::inner::StructInInlineNamespace, >>::ctor_new(arg) } } impl<'b> - ctor::CtorNew< - ctor::RvalueReference< + ::ctor::CtorNew< + ::ctor::RvalueReference< 'b, crate::test_namespace_bindings_inline::inner::StructInInlineNamespace, >, > for StructInInlineNamespace { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new( - args: ctor::RvalueReference< + args: ::ctor::RvalueReference< 'b, crate::test_namespace_bindings_inline::inner::StructInInlineNamespace, >, ) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin< - &mut crate::rust_std::mem::MaybeUninit<Self>, - >| { - unsafe { - crate::detail::__rust_thunk___ZN30test_namespace_bindings_inline5inner23StructInInlineNamespaceC1EOS1_(crate::rust_std::pin::Pin::into_inner_unchecked(dest),__param_0); - } + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { + crate::detail::__rust_thunk___ZN30test_namespace_bindings_inline5inner23StructInInlineNamespaceC1EOS1_(::std::pin::Pin::into_inner_unchecked(dest),__param_0); }, ) } } impl<'b> - ctor::CtorNew<( - ctor::RvalueReference< + ::ctor::CtorNew<( + ::ctor::RvalueReference< 'b, crate::test_namespace_bindings_inline::inner::StructInInlineNamespace, >, )> for StructInInlineNamespace { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new( args: ( - ctor::RvalueReference< + ::ctor::RvalueReference< 'b, crate::test_namespace_bindings_inline::inner::StructInInlineNamespace, >, ), ) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew< - ctor::RvalueReference< + <Self as ::ctor::CtorNew< + ::ctor::RvalueReference< 'b, crate::test_namespace_bindings_inline::inner::StructInInlineNamespace, >, @@ -430,7 +406,7 @@ { #[inline(always)] fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, + self: ::std::pin::Pin<&'a mut Self>, __param_0:&'b crate::test_namespace_bindings_inline::inner::StructInInlineNamespace, ) { unsafe { @@ -441,7 +417,7 @@ impl<'b> ::ctor::Assign< - ctor::RvalueReference< + ::ctor::RvalueReference< 'b, crate::test_namespace_bindings_inline::inner::StructInInlineNamespace, >, @@ -449,8 +425,8 @@ { #[inline(always)] fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, - __param_0: ctor::RvalueReference< + self: ::std::pin::Pin<&'a mut Self>, + __param_0: ::ctor::RvalueReference< 'b, crate::test_namespace_bindings_inline::inner::StructInInlineNamespace, >, @@ -492,21 +468,21 @@ use super::*; extern "C" { pub(crate) fn __rust_thunk___ZN23test_namespace_bindings1SC1ERKS0_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::test_namespace_bindings::S>, + __this: &'a mut ::std::mem::MaybeUninit<crate::test_namespace_bindings::S>, __param_0: &'b crate::test_namespace_bindings::S, ); pub(crate) fn __rust_thunk___ZN23test_namespace_bindings1SC1EOS0_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::test_namespace_bindings::S>, - __param_0: ctor::RvalueReference<'b, crate::test_namespace_bindings::S>, + __this: &'a mut ::std::mem::MaybeUninit<crate::test_namespace_bindings::S>, + __param_0: ::ctor::RvalueReference<'b, crate::test_namespace_bindings::S>, ); pub(crate) fn __rust_thunk___ZN23test_namespace_bindings1SaSERKS0_<'a, 'b>( - __this: crate::rust_std::pin::Pin<&'a mut crate::test_namespace_bindings::S>, + __this: ::std::pin::Pin<&'a mut crate::test_namespace_bindings::S>, __param_0: &'b crate::test_namespace_bindings::S, - ) -> crate::rust_std::pin::Pin<&'a mut crate::test_namespace_bindings::S>; + ) -> ::std::pin::Pin<&'a mut crate::test_namespace_bindings::S>; pub(crate) fn __rust_thunk___ZN23test_namespace_bindings1SaSEOS0_<'a, 'b>( - __this: crate::rust_std::pin::Pin<&'a mut crate::test_namespace_bindings::S>, - __param_0: ctor::RvalueReference<'b, crate::test_namespace_bindings::S>, - ) -> crate::rust_std::pin::Pin<&'a mut crate::test_namespace_bindings::S>; + __this: ::std::pin::Pin<&'a mut crate::test_namespace_bindings::S>, + __param_0: ::ctor::RvalueReference<'b, crate::test_namespace_bindings::S>, + ) -> ::std::pin::Pin<&'a mut crate::test_namespace_bindings::S>; #[link_name = "_ZN23test_namespace_bindings1fENS_1SE"] pub(crate) fn __rust_thunk___ZN23test_namespace_bindings1fENS_1SE( s: crate::test_namespace_bindings::S, @@ -521,29 +497,31 @@ #[link_name = "_ZN32test_namespace_bindings_reopened1xEv"] pub(crate) fn __rust_thunk___ZN32test_namespace_bindings_reopened1xEv(); pub(crate) fn __rust_thunk___ZN32test_namespace_bindings_reopened5inner1SC1ERKS1_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit< + __this: &'a mut ::std::mem::MaybeUninit< crate::test_namespace_bindings_reopened::inner::S, >, __param_0: &'b crate::test_namespace_bindings_reopened::inner::S, ); pub(crate) fn __rust_thunk___ZN32test_namespace_bindings_reopened5inner1SC1EOS1_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit< + __this: &'a mut ::std::mem::MaybeUninit< crate::test_namespace_bindings_reopened::inner::S, >, - __param_0: ctor::RvalueReference<'b, crate::test_namespace_bindings_reopened::inner::S>, + __param_0: ::ctor::RvalueReference< + 'b, + crate::test_namespace_bindings_reopened::inner::S, + >, ); pub(crate) fn __rust_thunk___ZN32test_namespace_bindings_reopened5inner1SaSERKS1_<'a, 'b>( - __this: crate::rust_std::pin::Pin< - &'a mut crate::test_namespace_bindings_reopened::inner::S, - >, + __this: ::std::pin::Pin<&'a mut crate::test_namespace_bindings_reopened::inner::S>, __param_0: &'b crate::test_namespace_bindings_reopened::inner::S, - ) -> crate::rust_std::pin::Pin<&'a mut crate::test_namespace_bindings_reopened::inner::S>; + ) -> ::std::pin::Pin<&'a mut crate::test_namespace_bindings_reopened::inner::S>; pub(crate) fn __rust_thunk___ZN32test_namespace_bindings_reopened5inner1SaSEOS1_<'a, 'b>( - __this: crate::rust_std::pin::Pin< - &'a mut crate::test_namespace_bindings_reopened::inner::S, + __this: ::std::pin::Pin<&'a mut crate::test_namespace_bindings_reopened::inner::S>, + __param_0: ::ctor::RvalueReference< + 'b, + crate::test_namespace_bindings_reopened::inner::S, >, - __param_0: ctor::RvalueReference<'b, crate::test_namespace_bindings_reopened::inner::S>, - ) -> crate::rust_std::pin::Pin<&'a mut crate::test_namespace_bindings_reopened::inner::S>; + ) -> ::std::pin::Pin<&'a mut crate::test_namespace_bindings_reopened::inner::S>; #[link_name = "_ZN32test_namespace_bindings_reopened1yEv"] pub(crate) fn __rust_thunk___ZN32test_namespace_bindings_reopened1yEv(); #[link_name = "_ZN32test_namespace_bindings_reopened5inner1zENS0_1SE"] @@ -553,7 +531,7 @@ pub(crate) fn __rust_thunk___ZN30test_namespace_bindings_inline5inner23StructInInlineNamespaceC1Ev< 'a, >( - __this: &'a mut crate::rust_std::mem::MaybeUninit< + __this: &'a mut ::std::mem::MaybeUninit< crate::test_namespace_bindings_inline::inner::StructInInlineNamespace, >, ); @@ -561,7 +539,7 @@ 'a, 'b, >( - __this: &'a mut crate::rust_std::mem::MaybeUninit< + __this: &'a mut ::std::mem::MaybeUninit< crate::test_namespace_bindings_inline::inner::StructInInlineNamespace, >, __param_0: &'b crate::test_namespace_bindings_inline::inner::StructInInlineNamespace, @@ -570,10 +548,10 @@ 'a, 'b, >( - __this: &'a mut crate::rust_std::mem::MaybeUninit< + __this: &'a mut ::std::mem::MaybeUninit< crate::test_namespace_bindings_inline::inner::StructInInlineNamespace, >, - __param_0: ctor::RvalueReference< + __param_0: ::ctor::RvalueReference< 'b, crate::test_namespace_bindings_inline::inner::StructInInlineNamespace, >, @@ -582,25 +560,25 @@ 'a, 'b, >( - __this: crate::rust_std::pin::Pin< + __this: ::std::pin::Pin< &'a mut crate::test_namespace_bindings_inline::inner::StructInInlineNamespace, >, __param_0: &'b crate::test_namespace_bindings_inline::inner::StructInInlineNamespace, - ) -> crate::rust_std::pin::Pin< + ) -> ::std::pin::Pin< &'a mut crate::test_namespace_bindings_inline::inner::StructInInlineNamespace, >; pub(crate) fn __rust_thunk___ZN30test_namespace_bindings_inline5inner23StructInInlineNamespaceaSEOS1_< 'a, 'b, >( - __this: crate::rust_std::pin::Pin< + __this: ::std::pin::Pin< &'a mut crate::test_namespace_bindings_inline::inner::StructInInlineNamespace, >, - __param_0: ctor::RvalueReference< + __param_0: ::ctor::RvalueReference< 'b, crate::test_namespace_bindings_inline::inner::StructInInlineNamespace, >, - ) -> crate::rust_std::pin::Pin< + ) -> ::std::pin::Pin< &'a mut crate::test_namespace_bindings_inline::inner::StructInInlineNamespace, >; #[link_name = "_Z43useStructInInlineNamespaceWithFullQualifierN30test_namespace_bindings_inline5inner23StructInInlineNamespaceE"] @@ -614,10 +592,10 @@ } } -const _: () = assert!(rust_std::mem::size_of::<Option<&i32>>() == rust_std::mem::size_of::<&i32>()); +const _: () = assert!(::std::mem::size_of::<Option<&i32>>() == ::std::mem::size_of::<&i32>()); -const _: () = assert!(rust_std::mem::size_of::<crate::test_namespace_bindings::S>() == 4); -const _: () = assert!(rust_std::mem::align_of::<crate::test_namespace_bindings::S>() == 4); +const _: () = assert!(::std::mem::size_of::<crate::test_namespace_bindings::S>() == 4); +const _: () = assert!(::std::mem::align_of::<crate::test_namespace_bindings::S>() == 4); const _: () = { static_assertions::assert_not_impl_any!(crate::test_namespace_bindings::S: Copy); }; @@ -628,9 +606,9 @@ assert!(memoffset_unstable_const::offset_of!(crate::test_namespace_bindings::S, i) == 0); const _: () = - assert!(rust_std::mem::size_of::<crate::test_namespace_bindings_reopened::inner::S>() == 1); + assert!(::std::mem::size_of::<crate::test_namespace_bindings_reopened::inner::S>() == 1); const _: () = - assert!(rust_std::mem::align_of::<crate::test_namespace_bindings_reopened::inner::S>() == 1); + assert!(::std::mem::align_of::<crate::test_namespace_bindings_reopened::inner::S>() == 1); const _: () = { static_assertions::assert_not_impl_any!( crate::test_namespace_bindings_reopened::inner::S: Copy @@ -643,12 +621,12 @@ }; const _: () = assert!( - rust_std::mem::size_of::<crate::test_namespace_bindings_inline::inner::StructInInlineNamespace>( - ) == 1 + ::std::mem::size_of::<crate::test_namespace_bindings_inline::inner::StructInInlineNamespace>() + == 1 ); const _: () = assert!( - rust_std::mem::align_of::<crate::test_namespace_bindings_inline::inner::StructInInlineNamespace>( - ) == 1 + ::std::mem::align_of::<crate::test_namespace_bindings_inline::inner::StructInInlineNamespace>() + == 1 ); const _: () = { static_assertions::assert_not_impl_any!(
diff --git a/rs_bindings_from_cc/test/golden/no_elided_lifetimes_rs_api.rs b/rs_bindings_from_cc/test/golden/no_elided_lifetimes_rs_api.rs index adcc1d0..5024e32 100644 --- a/rs_bindings_from_cc/test/golden/no_elided_lifetimes_rs_api.rs +++ b/rs_bindings_from_cc/test/golden/no_elided_lifetimes_rs_api.rs
@@ -11,8 +11,6 @@ #![allow(non_upper_case_globals)] #![deny(warnings)] -use ::std as rust_std; - // Part of the Crubit project, under the Apache License v2.0 with LLVM // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception @@ -25,7 +23,7 @@ #[derive(Clone, Copy)] #[repr(C)] pub struct S { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 1], + __non_field_data: [::std::mem::MaybeUninit<u8>; 1], } forward_declare::unsafe_define!(forward_declare::symbol!("S"), crate::S); @@ -63,10 +61,10 @@ } } -#[ctor::recursively_pinned(PinnedDrop)] +#[::ctor::recursively_pinned(PinnedDrop)] #[repr(C)] pub struct TriviallyCopyableButNontriviallyDestructible { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 1], + __non_field_data: [::std::mem::MaybeUninit<u8>; 1], } forward_declare::unsafe_define!( forward_declare::symbol!("TriviallyCopyableButNontriviallyDestructible"), @@ -83,7 +81,7 @@ impl ::ctor::PinnedDrop for TriviallyCopyableButNontriviallyDestructible { #[inline(always)] - unsafe fn pinned_drop<'a>(self: crate::rust_std::pin::Pin<&'a mut Self>) { + unsafe fn pinned_drop<'a>(self: ::std::pin::Pin<&'a mut Self>) { crate::detail::__rust_thunk___ZN44TriviallyCopyableButNontriviallyDestructibleD1Ev(self) } } @@ -115,19 +113,17 @@ ) -> *mut i32; #[link_name = "_ZN44TriviallyCopyableButNontriviallyDestructibleD1Ev"] pub(crate) fn __rust_thunk___ZN44TriviallyCopyableButNontriviallyDestructibleD1Ev<'a>( - __this: crate::rust_std::pin::Pin< - &'a mut crate::TriviallyCopyableButNontriviallyDestructible, - >, + __this: ::std::pin::Pin<&'a mut crate::TriviallyCopyableButNontriviallyDestructible>, ); #[link_name = "_Z12take_pointerPi"] pub(crate) fn __rust_thunk___Z12take_pointerPi(p: *mut i32); } } -const _: () = assert!(rust_std::mem::size_of::<Option<&i32>>() == rust_std::mem::size_of::<&i32>()); +const _: () = assert!(::std::mem::size_of::<Option<&i32>>() == ::std::mem::size_of::<&i32>()); -const _: () = assert!(rust_std::mem::size_of::<crate::S>() == 1); -const _: () = assert!(rust_std::mem::align_of::<crate::S>() == 1); +const _: () = assert!(::std::mem::size_of::<crate::S>() == 1); +const _: () = assert!(::std::mem::align_of::<crate::S>() == 1); const _: () = { static_assertions::assert_impl_all!(crate::S: Clone); }; @@ -139,9 +135,9 @@ }; const _: () = - assert!(rust_std::mem::size_of::<crate::TriviallyCopyableButNontriviallyDestructible>() == 1); + assert!(::std::mem::size_of::<crate::TriviallyCopyableButNontriviallyDestructible>() == 1); const _: () = - assert!(rust_std::mem::align_of::<crate::TriviallyCopyableButNontriviallyDestructible>() == 1); + assert!(::std::mem::align_of::<crate::TriviallyCopyableButNontriviallyDestructible>() == 1); const _: () = { static_assertions::assert_not_impl_any!( crate::TriviallyCopyableButNontriviallyDestructible: Copy
diff --git a/rs_bindings_from_cc/test/golden/no_unique_address_rs_api.rs b/rs_bindings_from_cc/test/golden/no_unique_address_rs_api.rs index 21bec6f..ee24a18 100644 --- a/rs_bindings_from_cc/test/golden/no_unique_address_rs_api.rs +++ b/rs_bindings_from_cc/test/golden/no_unique_address_rs_api.rs
@@ -11,8 +11,6 @@ #![allow(non_upper_case_globals)] #![deny(warnings)] -use ::std as rust_std; - // Part of the Crubit project, under the Apache License v2.0 with LLVM // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception @@ -27,8 +25,8 @@ pub struct Struct { /// Nobody would ever use a no_unique_address int/char field, this is just /// enough to test that the transmute is correct. - pub(crate) field1: [crate::rust_std::mem::MaybeUninit<u8>; 4], - pub(crate) field2: [crate::rust_std::mem::MaybeUninit<u8>; 4], + pub(crate) field1: [::std::mem::MaybeUninit<u8>; 4], + pub(crate) field2: [::std::mem::MaybeUninit<u8>; 4], } forward_declare::unsafe_define!(forward_declare::symbol!("Struct"), crate::Struct); impl Struct { @@ -43,7 +41,7 @@ impl Default for Struct { #[inline(always)] fn default() -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN6StructC1Ev(&mut tmp); tmp.assume_init() @@ -51,10 +49,10 @@ } } -impl<'b> From<ctor::RvalueReference<'b, crate::Struct>> for Struct { +impl<'b> From<::ctor::RvalueReference<'b, crate::Struct>> for Struct { #[inline(always)] - fn from(__param_0: ctor::RvalueReference<'b, crate::Struct>) -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + fn from(__param_0: ::ctor::RvalueReference<'b, crate::Struct>) -> Self { + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN6StructC1EOS_(&mut tmp, __param_0); tmp.assume_init() @@ -87,9 +85,9 @@ pub struct PaddingBetweenFields { /// size: 1, alignment: 1 => offset: 0 pub field1: u8, - __padding1: [crate::rust_std::mem::MaybeUninit<u8>; 3], + __padding1: [::std::mem::MaybeUninit<u8>; 3], /// size: 4, alignment: 4 => offset: 4 - pub(crate) field2: [crate::rust_std::mem::MaybeUninit<u8>; 4], + pub(crate) field2: [::std::mem::MaybeUninit<u8>; 4], } forward_declare::unsafe_define!( forward_declare::symbol!("PaddingBetweenFields"), @@ -104,7 +102,7 @@ impl Default for PaddingBetweenFields { #[inline(always)] fn default() -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN20PaddingBetweenFieldsC1Ev(&mut tmp); tmp.assume_init() @@ -112,10 +110,10 @@ } } -impl<'b> From<ctor::RvalueReference<'b, crate::PaddingBetweenFields>> for PaddingBetweenFields { +impl<'b> From<::ctor::RvalueReference<'b, crate::PaddingBetweenFields>> for PaddingBetweenFields { #[inline(always)] - fn from(__param_0: ctor::RvalueReference<'b, crate::PaddingBetweenFields>) -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + fn from(__param_0: ::ctor::RvalueReference<'b, crate::PaddingBetweenFields>) -> Self { + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN20PaddingBetweenFieldsC1EOS_(&mut tmp, __param_0); tmp.assume_init() @@ -143,7 +141,7 @@ /// - dsize (size without padding): 5 /// (4 bytes for `inner_int_field`, 1 byte for `inner_char_field`) /// - size: 8 (dsize adjusted up to account for alignment) -#[ctor::recursively_pinned(PinnedDrop)] +#[::ctor::recursively_pinned(PinnedDrop)] #[repr(C)] pub struct FieldInTailPadding_InnerStruct { /// size: 4, alignment: 4 => offset: 0 @@ -156,46 +154,46 @@ crate::FieldInTailPadding_InnerStruct ); -impl ctor::CtorNew<()> for FieldInTailPadding_InnerStruct { - type CtorType = impl ctor::Ctor<Output = Self>; +impl ::ctor::CtorNew<()> for FieldInTailPadding_InnerStruct { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: ()) -> Self::CtorType { let () = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN30FieldInTailPadding_InnerStructC1Ev( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), ); }, ) } } -impl<'b> ctor::CtorNew<&'b crate::FieldInTailPadding_InnerStruct> +impl<'b> ::ctor::CtorNew<&'b crate::FieldInTailPadding_InnerStruct> for FieldInTailPadding_InnerStruct { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: &'b crate::FieldInTailPadding_InnerStruct) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN30FieldInTailPadding_InnerStructC1ERKS_( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), __param_0, ); }, ) } } -impl<'b> ctor::CtorNew<(&'b crate::FieldInTailPadding_InnerStruct,)> +impl<'b> ::ctor::CtorNew<(&'b crate::FieldInTailPadding_InnerStruct,)> for FieldInTailPadding_InnerStruct { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: (&'b crate::FieldInTailPadding_InnerStruct,)) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<&'b crate::FieldInTailPadding_InnerStruct>>::ctor_new(arg) + <Self as ::ctor::CtorNew<&'b crate::FieldInTailPadding_InnerStruct>>::ctor_new(arg) } } @@ -204,7 +202,7 @@ { #[inline(always)] fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, + self: ::std::pin::Pin<&'a mut Self>, __param_0: &'b crate::FieldInTailPadding_InnerStruct, ) { unsafe { @@ -219,7 +217,7 @@ /// layout. impl ::ctor::PinnedDrop for FieldInTailPadding_InnerStruct { #[inline(always)] - unsafe fn pinned_drop<'a>(self: crate::rust_std::pin::Pin<&'a mut Self>) { + unsafe fn pinned_drop<'a>(self: ::std::pin::Pin<&'a mut Self>) { crate::detail::__rust_thunk___ZN30FieldInTailPadding_InnerStructD1Ev(self) } } @@ -232,11 +230,11 @@ /// done through compile-time assertions of field offsets in the generated Rust /// code. The initial alignment-based fix idea for b/232418721 would incorrectly /// put `char_in_tail_padding_of_prev_field` at offset 8. -#[ctor::recursively_pinned(PinnedDrop)] +#[::ctor::recursively_pinned(PinnedDrop)] #[repr(C, align(4))] pub struct FieldInTailPadding { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 0], - pub(crate) inner_struct: [crate::rust_std::mem::MaybeUninit<u8>; 5], + __non_field_data: [::std::mem::MaybeUninit<u8>; 0], + pub(crate) inner_struct: [::std::mem::MaybeUninit<u8>; 5], /// offset: 5 (dsize of `s`). pub char_in_tail_padding_of_prev_field: u8, } @@ -252,84 +250,83 @@ } } -impl<'b> ctor::CtorNew<&'b crate::FieldInTailPadding> for FieldInTailPadding { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<&'b crate::FieldInTailPadding> for FieldInTailPadding { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: &'b crate::FieldInTailPadding) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN18FieldInTailPaddingC1ERKS_( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), __param_0, ); }, ) } } -impl<'b> ctor::CtorNew<(&'b crate::FieldInTailPadding,)> for FieldInTailPadding { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<(&'b crate::FieldInTailPadding,)> for FieldInTailPadding { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: (&'b crate::FieldInTailPadding,)) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<&'b crate::FieldInTailPadding>>::ctor_new(arg) + <Self as ::ctor::CtorNew<&'b crate::FieldInTailPadding>>::ctor_new(arg) } } -impl<'b> ctor::CtorNew<ctor::RvalueReference<'b, crate::FieldInTailPadding>> +impl<'b> ::ctor::CtorNew<::ctor::RvalueReference<'b, crate::FieldInTailPadding>> for FieldInTailPadding { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] - fn ctor_new(args: ctor::RvalueReference<'b, crate::FieldInTailPadding>) -> Self::CtorType { + fn ctor_new(args: ::ctor::RvalueReference<'b, crate::FieldInTailPadding>) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN18FieldInTailPaddingC1EOS_( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), __param_0, ); }, ) } } -impl<'b> ctor::CtorNew<(ctor::RvalueReference<'b, crate::FieldInTailPadding>,)> +impl<'b> ::ctor::CtorNew<(::ctor::RvalueReference<'b, crate::FieldInTailPadding>,)> for FieldInTailPadding { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] - fn ctor_new(args: (ctor::RvalueReference<'b, crate::FieldInTailPadding>,)) -> Self::CtorType { + fn ctor_new(args: (::ctor::RvalueReference<'b, crate::FieldInTailPadding>,)) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<ctor::RvalueReference<'b, crate::FieldInTailPadding>>>::ctor_new(arg) + <Self as ::ctor::CtorNew<::ctor::RvalueReference<'b, crate::FieldInTailPadding>>>::ctor_new( + arg, + ) } } impl ::ctor::PinnedDrop for FieldInTailPadding { #[inline(always)] - unsafe fn pinned_drop<'a>(self: crate::rust_std::pin::Pin<&'a mut Self>) { + unsafe fn pinned_drop<'a>(self: ::std::pin::Pin<&'a mut Self>) { crate::detail::__rust_thunk___ZN18FieldInTailPaddingD1Ev(self) } } impl<'b> ::ctor::Assign<&'b crate::FieldInTailPadding> for FieldInTailPadding { #[inline(always)] - fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, - __param_0: &'b crate::FieldInTailPadding, - ) { + fn assign<'a>(self: ::std::pin::Pin<&'a mut Self>, __param_0: &'b crate::FieldInTailPadding) { unsafe { crate::detail::__rust_thunk___ZN18FieldInTailPaddingaSERKS_(self, __param_0); } } } -impl<'b> ::ctor::Assign<ctor::RvalueReference<'b, crate::FieldInTailPadding>> +impl<'b> ::ctor::Assign<::ctor::RvalueReference<'b, crate::FieldInTailPadding>> for FieldInTailPadding { #[inline(always)] fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, - __param_0: ctor::RvalueReference<'b, crate::FieldInTailPadding>, + self: ::std::pin::Pin<&'a mut Self>, + __param_0: ::ctor::RvalueReference<'b, crate::FieldInTailPadding>, ) { unsafe { crate::detail::__rust_thunk___ZN18FieldInTailPaddingaSEOS_(self, __param_0); @@ -337,15 +334,15 @@ } } -impl ctor::CtorNew<(i32, u8, u8)> for FieldInTailPadding { - type CtorType = impl ctor::Ctor<Output = Self>; +impl ::ctor::CtorNew<(i32, u8, u8)> for FieldInTailPadding { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: (i32, u8, u8)) -> Self::CtorType { let (inner_int, inner_char, outer_char) = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN18FieldInTailPaddingC1Eicc( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), inner_int, inner_char, outer_char, @@ -362,63 +359,59 @@ use super::*; extern "C" { pub(crate) fn __rust_thunk___ZN6StructC1Ev<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::Struct>, + __this: &'a mut ::std::mem::MaybeUninit<crate::Struct>, ); pub(crate) fn __rust_thunk___ZN6StructC1EOS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::Struct>, - __param_0: ctor::RvalueReference<'b, crate::Struct>, + __this: &'a mut ::std::mem::MaybeUninit<crate::Struct>, + __param_0: ::ctor::RvalueReference<'b, crate::Struct>, ); pub(crate) fn __rust_thunk___ZN6Struct4MakeEic(f1: i32, f2: u8) -> crate::Struct; pub(crate) fn __rust_thunk___ZN20PaddingBetweenFieldsC1Ev<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::PaddingBetweenFields>, + __this: &'a mut ::std::mem::MaybeUninit<crate::PaddingBetweenFields>, ); pub(crate) fn __rust_thunk___ZN20PaddingBetweenFieldsC1EOS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::PaddingBetweenFields>, - __param_0: ctor::RvalueReference<'b, crate::PaddingBetweenFields>, + __this: &'a mut ::std::mem::MaybeUninit<crate::PaddingBetweenFields>, + __param_0: ::ctor::RvalueReference<'b, crate::PaddingBetweenFields>, ); pub(crate) fn __rust_thunk___ZN20PaddingBetweenFields4MakeEci( f1: u8, f2: i32, ) -> crate::PaddingBetweenFields; pub(crate) fn __rust_thunk___ZN30FieldInTailPadding_InnerStructC1Ev<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit< - crate::FieldInTailPadding_InnerStruct, - >, + __this: &'a mut ::std::mem::MaybeUninit<crate::FieldInTailPadding_InnerStruct>, ); pub(crate) fn __rust_thunk___ZN30FieldInTailPadding_InnerStructC1ERKS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit< - crate::FieldInTailPadding_InnerStruct, - >, + __this: &'a mut ::std::mem::MaybeUninit<crate::FieldInTailPadding_InnerStruct>, __param_0: &'b crate::FieldInTailPadding_InnerStruct, ); pub(crate) fn __rust_thunk___ZN30FieldInTailPadding_InnerStructaSERKS_<'a, 'b>( - __this: crate::rust_std::pin::Pin<&'a mut crate::FieldInTailPadding_InnerStruct>, + __this: ::std::pin::Pin<&'a mut crate::FieldInTailPadding_InnerStruct>, __param_0: &'b crate::FieldInTailPadding_InnerStruct, - ) -> crate::rust_std::pin::Pin<&'a mut crate::FieldInTailPadding_InnerStruct>; + ) -> ::std::pin::Pin<&'a mut crate::FieldInTailPadding_InnerStruct>; pub(crate) fn __rust_thunk___ZN30FieldInTailPadding_InnerStructD1Ev<'a>( - __this: crate::rust_std::pin::Pin<&'a mut crate::FieldInTailPadding_InnerStruct>, + __this: ::std::pin::Pin<&'a mut crate::FieldInTailPadding_InnerStruct>, ); pub(crate) fn __rust_thunk___ZN18FieldInTailPaddingC1ERKS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::FieldInTailPadding>, + __this: &'a mut ::std::mem::MaybeUninit<crate::FieldInTailPadding>, __param_0: &'b crate::FieldInTailPadding, ); pub(crate) fn __rust_thunk___ZN18FieldInTailPaddingC1EOS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::FieldInTailPadding>, - __param_0: ctor::RvalueReference<'b, crate::FieldInTailPadding>, + __this: &'a mut ::std::mem::MaybeUninit<crate::FieldInTailPadding>, + __param_0: ::ctor::RvalueReference<'b, crate::FieldInTailPadding>, ); pub(crate) fn __rust_thunk___ZN18FieldInTailPaddingD1Ev<'a>( - __this: crate::rust_std::pin::Pin<&'a mut crate::FieldInTailPadding>, + __this: ::std::pin::Pin<&'a mut crate::FieldInTailPadding>, ); pub(crate) fn __rust_thunk___ZN18FieldInTailPaddingaSERKS_<'a, 'b>( - __this: crate::rust_std::pin::Pin<&'a mut crate::FieldInTailPadding>, + __this: ::std::pin::Pin<&'a mut crate::FieldInTailPadding>, __param_0: &'b crate::FieldInTailPadding, - ) -> crate::rust_std::pin::Pin<&'a mut crate::FieldInTailPadding>; + ) -> ::std::pin::Pin<&'a mut crate::FieldInTailPadding>; pub(crate) fn __rust_thunk___ZN18FieldInTailPaddingaSEOS_<'a, 'b>( - __this: crate::rust_std::pin::Pin<&'a mut crate::FieldInTailPadding>, - __param_0: ctor::RvalueReference<'b, crate::FieldInTailPadding>, - ) -> crate::rust_std::pin::Pin<&'a mut crate::FieldInTailPadding>; + __this: ::std::pin::Pin<&'a mut crate::FieldInTailPadding>, + __param_0: ::ctor::RvalueReference<'b, crate::FieldInTailPadding>, + ) -> ::std::pin::Pin<&'a mut crate::FieldInTailPadding>; pub(crate) fn __rust_thunk___ZN18FieldInTailPaddingC1Eicc<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::FieldInTailPadding>, + __this: &'a mut ::std::mem::MaybeUninit<crate::FieldInTailPadding>, inner_int: i32, inner_char: u8, outer_char: u8, @@ -426,10 +419,10 @@ } } -const _: () = assert!(rust_std::mem::size_of::<Option<&i32>>() == rust_std::mem::size_of::<&i32>()); +const _: () = assert!(::std::mem::size_of::<Option<&i32>>() == ::std::mem::size_of::<&i32>()); -const _: () = assert!(rust_std::mem::size_of::<crate::Struct>() == 8); -const _: () = assert!(rust_std::mem::align_of::<crate::Struct>() == 4); +const _: () = assert!(::std::mem::size_of::<crate::Struct>() == 8); +const _: () = assert!(::std::mem::align_of::<crate::Struct>() == 4); const _: () = { static_assertions::assert_impl_all!(crate::Struct: Clone); }; @@ -442,8 +435,8 @@ const _: () = assert!(memoffset_unstable_const::offset_of!(crate::Struct, field1) == 0); const _: () = assert!(memoffset_unstable_const::offset_of!(crate::Struct, field2) == 4); -const _: () = assert!(rust_std::mem::size_of::<crate::PaddingBetweenFields>() == 8); -const _: () = assert!(rust_std::mem::align_of::<crate::PaddingBetweenFields>() == 4); +const _: () = assert!(::std::mem::size_of::<crate::PaddingBetweenFields>() == 8); +const _: () = assert!(::std::mem::align_of::<crate::PaddingBetweenFields>() == 4); const _: () = { static_assertions::assert_impl_all!(crate::PaddingBetweenFields: Clone); }; @@ -458,8 +451,8 @@ const _: () = assert!(memoffset_unstable_const::offset_of!(crate::PaddingBetweenFields, field2) == 4); -const _: () = assert!(rust_std::mem::size_of::<crate::FieldInTailPadding_InnerStruct>() == 8); -const _: () = assert!(rust_std::mem::align_of::<crate::FieldInTailPadding_InnerStruct>() == 4); +const _: () = assert!(::std::mem::size_of::<crate::FieldInTailPadding_InnerStruct>() == 8); +const _: () = assert!(::std::mem::align_of::<crate::FieldInTailPadding_InnerStruct>() == 4); const _: () = { static_assertions::assert_not_impl_any!(crate::FieldInTailPadding_InnerStruct: Copy); }; @@ -481,8 +474,8 @@ static_assertions::assert_impl_all!(u8: Copy); }; -const _: () = assert!(rust_std::mem::size_of::<crate::FieldInTailPadding>() == 8); -const _: () = assert!(rust_std::mem::align_of::<crate::FieldInTailPadding>() == 4); +const _: () = assert!(::std::mem::size_of::<crate::FieldInTailPadding>() == 8); +const _: () = assert!(::std::mem::align_of::<crate::FieldInTailPadding>() == 4); const _: () = { static_assertions::assert_not_impl_any!(crate::FieldInTailPadding: Copy); };
diff --git a/rs_bindings_from_cc/test/golden/nontrivial_type_rs_api.rs b/rs_bindings_from_cc/test/golden/nontrivial_type_rs_api.rs index a8a3477..4cf96d5 100644 --- a/rs_bindings_from_cc/test/golden/nontrivial_type_rs_api.rs +++ b/rs_bindings_from_cc/test/golden/nontrivial_type_rs_api.rs
@@ -11,8 +11,6 @@ #![allow(non_upper_case_globals)] #![deny(warnings)] -use ::std as rust_std; - // Part of the Crubit project, under the Apache License v2.0 with LLVM // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception @@ -22,62 +20,62 @@ /// /// This makes it nontrivial for calls (so not trivially relocatable), as well /// as specifically giving it a nontrivial move constructor and destructor. -#[ctor::recursively_pinned(PinnedDrop)] +#[::ctor::recursively_pinned(PinnedDrop)] #[repr(C)] pub struct Nontrivial { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 0], + __non_field_data: [::std::mem::MaybeUninit<u8>; 0], pub field: i32, } forward_declare::unsafe_define!(forward_declare::symbol!("Nontrivial"), crate::Nontrivial); -impl ctor::CtorNew<()> for Nontrivial { - type CtorType = impl ctor::Ctor<Output = Self>; +impl ::ctor::CtorNew<()> for Nontrivial { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: ()) -> Self::CtorType { let () = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN10NontrivialC1Ev( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), ); }, ) } } -impl ctor::CtorNew<i32> for Nontrivial { - type CtorType = impl ctor::Ctor<Output = Self>; +impl ::ctor::CtorNew<i32> for Nontrivial { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: i32) -> Self::CtorType { let field = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN10NontrivialC1Ei( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), field, ); }, ) } } -impl ctor::CtorNew<(i32,)> for Nontrivial { - type CtorType = impl ctor::Ctor<Output = Self>; +impl ::ctor::CtorNew<(i32,)> for Nontrivial { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: (i32,)) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<i32>>::ctor_new(arg) + <Self as ::ctor::CtorNew<i32>>::ctor_new(arg) } } -impl ctor::CtorNew<(i32, i32)> for Nontrivial { - type CtorType = impl ctor::Ctor<Output = Self>; +impl ::ctor::CtorNew<(i32, i32)> for Nontrivial { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: (i32, i32)) -> Self::CtorType { let (field, unused) = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN10NontrivialC1Eii( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), field, unused, ); @@ -86,68 +84,68 @@ } } -impl<'b> ctor::CtorNew<&'b crate::Nontrivial> for Nontrivial { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<&'b crate::Nontrivial> for Nontrivial { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: &'b crate::Nontrivial) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN10NontrivialC1ERKS_( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), __param_0, ); }, ) } } -impl<'b> ctor::CtorNew<(&'b crate::Nontrivial,)> for Nontrivial { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<(&'b crate::Nontrivial,)> for Nontrivial { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: (&'b crate::Nontrivial,)) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<&'b crate::Nontrivial>>::ctor_new(arg) + <Self as ::ctor::CtorNew<&'b crate::Nontrivial>>::ctor_new(arg) } } -impl<'b> ctor::CtorNew<ctor::RvalueReference<'b, crate::Nontrivial>> for Nontrivial { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<::ctor::RvalueReference<'b, crate::Nontrivial>> for Nontrivial { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] - fn ctor_new(args: ctor::RvalueReference<'b, crate::Nontrivial>) -> Self::CtorType { + fn ctor_new(args: ::ctor::RvalueReference<'b, crate::Nontrivial>) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN10NontrivialC1EOS_( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), __param_0, ); }, ) } } -impl<'b> ctor::CtorNew<(ctor::RvalueReference<'b, crate::Nontrivial>,)> for Nontrivial { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<(::ctor::RvalueReference<'b, crate::Nontrivial>,)> for Nontrivial { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] - fn ctor_new(args: (ctor::RvalueReference<'b, crate::Nontrivial>,)) -> Self::CtorType { + fn ctor_new(args: (::ctor::RvalueReference<'b, crate::Nontrivial>,)) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<ctor::RvalueReference<'b, crate::Nontrivial>>>::ctor_new(arg) + <Self as ::ctor::CtorNew<::ctor::RvalueReference<'b, crate::Nontrivial>>>::ctor_new(arg) } } impl<'b> ::ctor::Assign<&'b crate::Nontrivial> for Nontrivial { #[inline(always)] - fn assign<'a>(self: crate::rust_std::pin::Pin<&'a mut Self>, __param_0: &'b crate::Nontrivial) { + fn assign<'a>(self: ::std::pin::Pin<&'a mut Self>, __param_0: &'b crate::Nontrivial) { unsafe { crate::detail::__rust_thunk___ZN10NontrivialaSERKS_(self, __param_0); } } } -impl<'b> ::ctor::Assign<ctor::RvalueReference<'b, crate::Nontrivial>> for Nontrivial { +impl<'b> ::ctor::Assign<::ctor::RvalueReference<'b, crate::Nontrivial>> for Nontrivial { #[inline(always)] fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, - __param_0: ctor::RvalueReference<'b, crate::Nontrivial>, + self: ::std::pin::Pin<&'a mut Self>, + __param_0: ::ctor::RvalueReference<'b, crate::Nontrivial>, ) { unsafe { crate::detail::__rust_thunk___ZN10NontrivialaSEOS_(self, __param_0); @@ -157,7 +155,7 @@ impl ::ctor::Assign<i32> for Nontrivial { #[inline(always)] - fn assign<'a>(self: crate::rust_std::pin::Pin<&'a mut Self>, __param_0: i32) { + fn assign<'a>(self: ::std::pin::Pin<&'a mut Self>, __param_0: i32) { unsafe { crate::detail::__rust_thunk___ZN10NontrivialaSEi(self, __param_0); } @@ -166,14 +164,14 @@ impl ::ctor::PinnedDrop for Nontrivial { #[inline(always)] - unsafe fn pinned_drop<'a>(self: crate::rust_std::pin::Pin<&'a mut Self>) { + unsafe fn pinned_drop<'a>(self: ::std::pin::Pin<&'a mut Self>) { crate::detail::__rust_thunk___ZN10NontrivialD1Ev(self) } } impl Nontrivial { #[inline(always)] - pub fn MemberFunction<'a>(self: crate::rust_std::pin::Pin<&'a mut Self>) { + pub fn MemberFunction<'a>(self: ::std::pin::Pin<&'a mut Self>) { unsafe { crate::detail::__rust_thunk___ZN10Nontrivial14MemberFunctionEv(self) } } } @@ -182,10 +180,10 @@ /// /// This makes it nontrivial for calls (so not trivially relocatable), as well /// as specifically giving it a nontrivial move constructor and destructor. -#[ctor::recursively_pinned(PinnedDrop)] +#[::ctor::recursively_pinned(PinnedDrop)] #[repr(C)] pub struct NontrivialInline { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 0], + __non_field_data: [::std::mem::MaybeUninit<u8>; 0], pub field: i32, } forward_declare::unsafe_define!( @@ -193,54 +191,54 @@ crate::NontrivialInline ); -impl ctor::CtorNew<()> for NontrivialInline { - type CtorType = impl ctor::Ctor<Output = Self>; +impl ::ctor::CtorNew<()> for NontrivialInline { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: ()) -> Self::CtorType { let () = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN16NontrivialInlineC1Ev( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), ); }, ) } } -impl ctor::CtorNew<i32> for NontrivialInline { - type CtorType = impl ctor::Ctor<Output = Self>; +impl ::ctor::CtorNew<i32> for NontrivialInline { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: i32) -> Self::CtorType { let field = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN16NontrivialInlineC1Ei( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), field, ); }, ) } } -impl ctor::CtorNew<(i32,)> for NontrivialInline { - type CtorType = impl ctor::Ctor<Output = Self>; +impl ::ctor::CtorNew<(i32,)> for NontrivialInline { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: (i32,)) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<i32>>::ctor_new(arg) + <Self as ::ctor::CtorNew<i32>>::ctor_new(arg) } } -impl ctor::CtorNew<(i32, i32)> for NontrivialInline { - type CtorType = impl ctor::Ctor<Output = Self>; +impl ::ctor::CtorNew<(i32, i32)> for NontrivialInline { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: (i32, i32)) -> Self::CtorType { let (field, unused) = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN16NontrivialInlineC1Eii( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), field, unused, ); @@ -249,71 +247,74 @@ } } -impl<'b> ctor::CtorNew<&'b crate::NontrivialInline> for NontrivialInline { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<&'b crate::NontrivialInline> for NontrivialInline { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: &'b crate::NontrivialInline) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN16NontrivialInlineC1ERKS_( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), __param_0, ); }, ) } } -impl<'b> ctor::CtorNew<(&'b crate::NontrivialInline,)> for NontrivialInline { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<(&'b crate::NontrivialInline,)> for NontrivialInline { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: (&'b crate::NontrivialInline,)) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<&'b crate::NontrivialInline>>::ctor_new(arg) + <Self as ::ctor::CtorNew<&'b crate::NontrivialInline>>::ctor_new(arg) } } -impl<'b> ctor::CtorNew<ctor::RvalueReference<'b, crate::NontrivialInline>> for NontrivialInline { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<::ctor::RvalueReference<'b, crate::NontrivialInline>> + for NontrivialInline +{ + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] - fn ctor_new(args: ctor::RvalueReference<'b, crate::NontrivialInline>) -> Self::CtorType { + fn ctor_new(args: ::ctor::RvalueReference<'b, crate::NontrivialInline>) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN16NontrivialInlineC1EOS_( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), __param_0, ); }, ) } } -impl<'b> ctor::CtorNew<(ctor::RvalueReference<'b, crate::NontrivialInline>,)> for NontrivialInline { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<(::ctor::RvalueReference<'b, crate::NontrivialInline>,)> + for NontrivialInline +{ + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] - fn ctor_new(args: (ctor::RvalueReference<'b, crate::NontrivialInline>,)) -> Self::CtorType { + fn ctor_new(args: (::ctor::RvalueReference<'b, crate::NontrivialInline>,)) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<ctor::RvalueReference<'b, crate::NontrivialInline>>>::ctor_new(arg) + <Self as ::ctor::CtorNew<::ctor::RvalueReference<'b, crate::NontrivialInline>>>::ctor_new( + arg, + ) } } impl<'b> ::ctor::Assign<&'b crate::NontrivialInline> for NontrivialInline { #[inline(always)] - fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, - __param_0: &'b crate::NontrivialInline, - ) { + fn assign<'a>(self: ::std::pin::Pin<&'a mut Self>, __param_0: &'b crate::NontrivialInline) { unsafe { crate::detail::__rust_thunk___ZN16NontrivialInlineaSERKS_(self, __param_0); } } } -impl<'b> ::ctor::Assign<ctor::RvalueReference<'b, crate::NontrivialInline>> for NontrivialInline { +impl<'b> ::ctor::Assign<::ctor::RvalueReference<'b, crate::NontrivialInline>> for NontrivialInline { #[inline(always)] fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, - __param_0: ctor::RvalueReference<'b, crate::NontrivialInline>, + self: ::std::pin::Pin<&'a mut Self>, + __param_0: ::ctor::RvalueReference<'b, crate::NontrivialInline>, ) { unsafe { crate::detail::__rust_thunk___ZN16NontrivialInlineaSEOS_(self, __param_0); @@ -323,7 +324,7 @@ impl ::ctor::Assign<i32> for NontrivialInline { #[inline(always)] - fn assign<'a>(self: crate::rust_std::pin::Pin<&'a mut Self>, __param_0: i32) { + fn assign<'a>(self: ::std::pin::Pin<&'a mut Self>, __param_0: i32) { unsafe { crate::detail::__rust_thunk___ZN16NontrivialInlineaSEi(self, __param_0); } @@ -332,14 +333,14 @@ impl ::ctor::PinnedDrop for NontrivialInline { #[inline(always)] - unsafe fn pinned_drop<'a>(self: crate::rust_std::pin::Pin<&'a mut Self>) { + unsafe fn pinned_drop<'a>(self: ::std::pin::Pin<&'a mut Self>) { crate::detail::__rust_thunk___ZN16NontrivialInlineD1Ev(self) } } impl NontrivialInline { #[inline(always)] - pub fn MemberFunction<'a>(self: crate::rust_std::pin::Pin<&'a mut Self>) { + pub fn MemberFunction<'a>(self: ::std::pin::Pin<&'a mut Self>) { unsafe { crate::detail::__rust_thunk___ZN16NontrivialInline14MemberFunctionEv(self) } } } @@ -349,105 +350,108 @@ /// This changes how the destructor / drop impl work -- instead of calling /// the destructor for NontrivialMembers, it just calls the destructors for /// each field. -#[ctor::recursively_pinned(PinnedDrop)] +#[::ctor::recursively_pinned(PinnedDrop)] #[repr(C)] pub struct NontrivialMembers { - pub nontrivial_member: crate::rust_std::mem::ManuallyDrop<crate::Nontrivial>, + pub nontrivial_member: ::std::mem::ManuallyDrop<crate::Nontrivial>, } forward_declare::unsafe_define!( forward_declare::symbol!("NontrivialMembers"), crate::NontrivialMembers ); -impl ctor::CtorNew<()> for NontrivialMembers { - type CtorType = impl ctor::Ctor<Output = Self>; +impl ::ctor::CtorNew<()> for NontrivialMembers { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: ()) -> Self::CtorType { let () = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN17NontrivialMembersC1Ev( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), ); }, ) } } -impl<'b> ctor::CtorNew<&'b crate::NontrivialMembers> for NontrivialMembers { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<&'b crate::NontrivialMembers> for NontrivialMembers { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: &'b crate::NontrivialMembers) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN17NontrivialMembersC1ERKS_( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), __param_0, ); }, ) } } -impl<'b> ctor::CtorNew<(&'b crate::NontrivialMembers,)> for NontrivialMembers { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<(&'b crate::NontrivialMembers,)> for NontrivialMembers { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: (&'b crate::NontrivialMembers,)) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<&'b crate::NontrivialMembers>>::ctor_new(arg) + <Self as ::ctor::CtorNew<&'b crate::NontrivialMembers>>::ctor_new(arg) } } -impl<'b> ctor::CtorNew<ctor::RvalueReference<'b, crate::NontrivialMembers>> for NontrivialMembers { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<::ctor::RvalueReference<'b, crate::NontrivialMembers>> + for NontrivialMembers +{ + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] - fn ctor_new(args: ctor::RvalueReference<'b, crate::NontrivialMembers>) -> Self::CtorType { + fn ctor_new(args: ::ctor::RvalueReference<'b, crate::NontrivialMembers>) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN17NontrivialMembersC1EOS_( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), __param_0, ); }, ) } } -impl<'b> ctor::CtorNew<(ctor::RvalueReference<'b, crate::NontrivialMembers>,)> +impl<'b> ::ctor::CtorNew<(::ctor::RvalueReference<'b, crate::NontrivialMembers>,)> for NontrivialMembers { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] - fn ctor_new(args: (ctor::RvalueReference<'b, crate::NontrivialMembers>,)) -> Self::CtorType { + fn ctor_new(args: (::ctor::RvalueReference<'b, crate::NontrivialMembers>,)) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<ctor::RvalueReference<'b, crate::NontrivialMembers>>>::ctor_new(arg) + <Self as ::ctor::CtorNew<::ctor::RvalueReference<'b, crate::NontrivialMembers>>>::ctor_new( + arg, + ) } } impl ::ctor::PinnedDrop for NontrivialMembers { #[inline(always)] - unsafe fn pinned_drop<'a>(self: crate::rust_std::pin::Pin<&'a mut Self>) { + unsafe fn pinned_drop<'a>(self: ::std::pin::Pin<&'a mut Self>) { crate::detail::__rust_thunk___ZN17NontrivialMembersD1Ev(self) } } impl<'b> ::ctor::Assign<&'b crate::NontrivialMembers> for NontrivialMembers { #[inline(always)] - fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, - __param_0: &'b crate::NontrivialMembers, - ) { + fn assign<'a>(self: ::std::pin::Pin<&'a mut Self>, __param_0: &'b crate::NontrivialMembers) { unsafe { crate::detail::__rust_thunk___ZN17NontrivialMembersaSERKS_(self, __param_0); } } } -impl<'b> ::ctor::Assign<ctor::RvalueReference<'b, crate::NontrivialMembers>> for NontrivialMembers { +impl<'b> ::ctor::Assign<::ctor::RvalueReference<'b, crate::NontrivialMembers>> + for NontrivialMembers +{ #[inline(always)] fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, - __param_0: ctor::RvalueReference<'b, crate::NontrivialMembers>, + self: ::std::pin::Pin<&'a mut Self>, + __param_0: ::ctor::RvalueReference<'b, crate::NontrivialMembers>, ) { unsafe { crate::detail::__rust_thunk___ZN17NontrivialMembersaSEOS_(self, __param_0); @@ -458,7 +462,7 @@ /// Nontrivial, but trivially relocatable and final (and therefore Unpin). #[repr(C)] pub struct NontrivialUnpin { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 0], + __non_field_data: [::std::mem::MaybeUninit<u8>; 0], pub field: i32, } forward_declare::unsafe_define!( @@ -469,7 +473,7 @@ impl Default for NontrivialUnpin { #[inline(always)] fn default() -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN15NontrivialUnpinC1Ev(&mut tmp); tmp.assume_init() @@ -488,7 +492,7 @@ impl Clone for NontrivialUnpin { #[inline(always)] fn clone<'b>(&'b self) -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN15NontrivialUnpinC1ERKS_(&mut tmp, self); tmp.assume_init() @@ -496,10 +500,10 @@ } } -impl<'b> From<ctor::RvalueReference<'b, crate::NontrivialUnpin>> for NontrivialUnpin { +impl<'b> From<::ctor::RvalueReference<'b, crate::NontrivialUnpin>> for NontrivialUnpin { #[inline(always)] - fn from(__param_0: ctor::RvalueReference<'b, crate::NontrivialUnpin>) -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + fn from(__param_0: ::ctor::RvalueReference<'b, crate::NontrivialUnpin>) -> Self { + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN15NontrivialUnpinC1EOS_(&mut tmp, __param_0); tmp.assume_init() @@ -507,10 +511,10 @@ } } -impl<'b> From<ctor::RvalueReference<'b, crate::Nontrivial>> for NontrivialUnpin { +impl<'b> From<::ctor::RvalueReference<'b, crate::Nontrivial>> for NontrivialUnpin { #[inline(always)] - fn from(__param_0: ctor::RvalueReference<'b, crate::Nontrivial>) -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + fn from(__param_0: ::ctor::RvalueReference<'b, crate::Nontrivial>) -> Self { + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN15NontrivialUnpinC1EO10Nontrivial(&mut tmp, __param_0); tmp.assume_init() @@ -573,8 +577,8 @@ #[inline(always)] pub fn TakesByReference<'a>( - nontrivial: crate::rust_std::pin::Pin<&'a mut crate::Nontrivial>, -) -> crate::rust_std::pin::Pin<&'a mut crate::Nontrivial> { + nontrivial: ::std::pin::Pin<&'a mut crate::Nontrivial>, +) -> ::std::pin::Pin<&'a mut crate::Nontrivial> { unsafe { crate::detail::__rust_thunk___Z16TakesByReferenceR10Nontrivial(nontrivial) } } @@ -595,58 +599,58 @@ } /// Finally, testing for strange by-value APIs. -#[ctor::recursively_pinned] +#[::ctor::recursively_pinned] #[repr(C)] pub struct NontrivialByValue { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 1], + __non_field_data: [::std::mem::MaybeUninit<u8>; 1], } forward_declare::unsafe_define!( forward_declare::symbol!("NontrivialByValue"), crate::NontrivialByValue ); -impl ctor::CtorNew<()> for NontrivialByValue { - type CtorType = impl ctor::Ctor<Output = Self>; +impl ::ctor::CtorNew<()> for NontrivialByValue { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: ()) -> Self::CtorType { let () = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN17NontrivialByValueC1Ev( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), ); }, ) } } -impl<'b> ctor::CtorNew<&'b crate::NontrivialByValue> for NontrivialByValue { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<&'b crate::NontrivialByValue> for NontrivialByValue { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: &'b crate::NontrivialByValue) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN17NontrivialByValueC1ERKS_( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), __param_0, ); }, ) } } -impl<'b> ctor::CtorNew<(&'b crate::NontrivialByValue,)> for NontrivialByValue { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<(&'b crate::NontrivialByValue,)> for NontrivialByValue { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: (&'b crate::NontrivialByValue,)) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<&'b crate::NontrivialByValue>>::ctor_new(arg) + <Self as ::ctor::CtorNew<&'b crate::NontrivialByValue>>::ctor_new(arg) } } impl ::ctor::Assign<crate::NontrivialByValue> for NontrivialByValue { #[inline(always)] - fn assign<'a>(self: crate::rust_std::pin::Pin<&'a mut Self>, other: crate::NontrivialByValue) { + fn assign<'a>(self: ::std::pin::Pin<&'a mut Self>, other: crate::NontrivialByValue) { unsafe { crate::detail::__rust_thunk___ZN17NontrivialByValueaSES_(self, other); } @@ -665,130 +669,130 @@ extern "C" { #[link_name = "_ZN10NontrivialC1Ev"] pub(crate) fn __rust_thunk___ZN10NontrivialC1Ev<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::Nontrivial>, + __this: &'a mut ::std::mem::MaybeUninit<crate::Nontrivial>, ); #[link_name = "_ZN10NontrivialC1Ei"] pub(crate) fn __rust_thunk___ZN10NontrivialC1Ei<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::Nontrivial>, + __this: &'a mut ::std::mem::MaybeUninit<crate::Nontrivial>, field: i32, ); #[link_name = "_ZN10NontrivialC1Eii"] pub(crate) fn __rust_thunk___ZN10NontrivialC1Eii<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::Nontrivial>, + __this: &'a mut ::std::mem::MaybeUninit<crate::Nontrivial>, field: i32, unused: i32, ); #[link_name = "_ZN10NontrivialC1ERKS_"] pub(crate) fn __rust_thunk___ZN10NontrivialC1ERKS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::Nontrivial>, + __this: &'a mut ::std::mem::MaybeUninit<crate::Nontrivial>, __param_0: &'b crate::Nontrivial, ); #[link_name = "_ZN10NontrivialC1EOS_"] pub(crate) fn __rust_thunk___ZN10NontrivialC1EOS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::Nontrivial>, - __param_0: ctor::RvalueReference<'b, crate::Nontrivial>, + __this: &'a mut ::std::mem::MaybeUninit<crate::Nontrivial>, + __param_0: ::ctor::RvalueReference<'b, crate::Nontrivial>, ); #[link_name = "_ZN10NontrivialaSERKS_"] pub(crate) fn __rust_thunk___ZN10NontrivialaSERKS_<'a, 'b>( - __this: crate::rust_std::pin::Pin<&'a mut crate::Nontrivial>, + __this: ::std::pin::Pin<&'a mut crate::Nontrivial>, __param_0: &'b crate::Nontrivial, - ) -> crate::rust_std::pin::Pin<&'a mut crate::Nontrivial>; + ) -> ::std::pin::Pin<&'a mut crate::Nontrivial>; #[link_name = "_ZN10NontrivialaSEOS_"] pub(crate) fn __rust_thunk___ZN10NontrivialaSEOS_<'a, 'b>( - __this: crate::rust_std::pin::Pin<&'a mut crate::Nontrivial>, - __param_0: ctor::RvalueReference<'b, crate::Nontrivial>, - ) -> crate::rust_std::pin::Pin<&'a mut crate::Nontrivial>; + __this: ::std::pin::Pin<&'a mut crate::Nontrivial>, + __param_0: ::ctor::RvalueReference<'b, crate::Nontrivial>, + ) -> ::std::pin::Pin<&'a mut crate::Nontrivial>; #[link_name = "_ZN10NontrivialaSEi"] pub(crate) fn __rust_thunk___ZN10NontrivialaSEi<'a>( - __this: crate::rust_std::pin::Pin<&'a mut crate::Nontrivial>, + __this: ::std::pin::Pin<&'a mut crate::Nontrivial>, __param_0: i32, - ) -> crate::rust_std::pin::Pin<&'a mut crate::Nontrivial>; + ) -> ::std::pin::Pin<&'a mut crate::Nontrivial>; #[link_name = "_ZN10NontrivialD1Ev"] pub(crate) fn __rust_thunk___ZN10NontrivialD1Ev<'a>( - __this: crate::rust_std::pin::Pin<&'a mut crate::Nontrivial>, + __this: ::std::pin::Pin<&'a mut crate::Nontrivial>, ); #[link_name = "_ZN10Nontrivial14MemberFunctionEv"] pub(crate) fn __rust_thunk___ZN10Nontrivial14MemberFunctionEv<'a>( - __this: crate::rust_std::pin::Pin<&'a mut crate::Nontrivial>, + __this: ::std::pin::Pin<&'a mut crate::Nontrivial>, ); pub(crate) fn __rust_thunk___ZN16NontrivialInlineC1Ev<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::NontrivialInline>, + __this: &'a mut ::std::mem::MaybeUninit<crate::NontrivialInline>, ); pub(crate) fn __rust_thunk___ZN16NontrivialInlineC1Ei<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::NontrivialInline>, + __this: &'a mut ::std::mem::MaybeUninit<crate::NontrivialInline>, field: i32, ); pub(crate) fn __rust_thunk___ZN16NontrivialInlineC1Eii<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::NontrivialInline>, + __this: &'a mut ::std::mem::MaybeUninit<crate::NontrivialInline>, field: i32, unused: i32, ); pub(crate) fn __rust_thunk___ZN16NontrivialInlineC1ERKS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::NontrivialInline>, + __this: &'a mut ::std::mem::MaybeUninit<crate::NontrivialInline>, __param_0: &'b crate::NontrivialInline, ); pub(crate) fn __rust_thunk___ZN16NontrivialInlineC1EOS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::NontrivialInline>, - __param_0: ctor::RvalueReference<'b, crate::NontrivialInline>, + __this: &'a mut ::std::mem::MaybeUninit<crate::NontrivialInline>, + __param_0: ::ctor::RvalueReference<'b, crate::NontrivialInline>, ); pub(crate) fn __rust_thunk___ZN16NontrivialInlineaSERKS_<'a, 'b>( - __this: crate::rust_std::pin::Pin<&'a mut crate::NontrivialInline>, + __this: ::std::pin::Pin<&'a mut crate::NontrivialInline>, __param_0: &'b crate::NontrivialInline, - ) -> crate::rust_std::pin::Pin<&'a mut crate::NontrivialInline>; + ) -> ::std::pin::Pin<&'a mut crate::NontrivialInline>; pub(crate) fn __rust_thunk___ZN16NontrivialInlineaSEOS_<'a, 'b>( - __this: crate::rust_std::pin::Pin<&'a mut crate::NontrivialInline>, - __param_0: ctor::RvalueReference<'b, crate::NontrivialInline>, - ) -> crate::rust_std::pin::Pin<&'a mut crate::NontrivialInline>; + __this: ::std::pin::Pin<&'a mut crate::NontrivialInline>, + __param_0: ::ctor::RvalueReference<'b, crate::NontrivialInline>, + ) -> ::std::pin::Pin<&'a mut crate::NontrivialInline>; pub(crate) fn __rust_thunk___ZN16NontrivialInlineaSEi<'a>( - __this: crate::rust_std::pin::Pin<&'a mut crate::NontrivialInline>, + __this: ::std::pin::Pin<&'a mut crate::NontrivialInline>, __param_0: i32, - ) -> crate::rust_std::pin::Pin<&'a mut crate::NontrivialInline>; + ) -> ::std::pin::Pin<&'a mut crate::NontrivialInline>; pub(crate) fn __rust_thunk___ZN16NontrivialInlineD1Ev<'a>( - __this: crate::rust_std::pin::Pin<&'a mut crate::NontrivialInline>, + __this: ::std::pin::Pin<&'a mut crate::NontrivialInline>, ); pub(crate) fn __rust_thunk___ZN16NontrivialInline14MemberFunctionEv<'a>( - __this: crate::rust_std::pin::Pin<&'a mut crate::NontrivialInline>, + __this: ::std::pin::Pin<&'a mut crate::NontrivialInline>, ); pub(crate) fn __rust_thunk___ZN17NontrivialMembersC1Ev<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::NontrivialMembers>, + __this: &'a mut ::std::mem::MaybeUninit<crate::NontrivialMembers>, ); pub(crate) fn __rust_thunk___ZN17NontrivialMembersC1ERKS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::NontrivialMembers>, + __this: &'a mut ::std::mem::MaybeUninit<crate::NontrivialMembers>, __param_0: &'b crate::NontrivialMembers, ); pub(crate) fn __rust_thunk___ZN17NontrivialMembersC1EOS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::NontrivialMembers>, - __param_0: ctor::RvalueReference<'b, crate::NontrivialMembers>, + __this: &'a mut ::std::mem::MaybeUninit<crate::NontrivialMembers>, + __param_0: ::ctor::RvalueReference<'b, crate::NontrivialMembers>, ); pub(crate) fn __rust_thunk___ZN17NontrivialMembersD1Ev<'a>( - __this: crate::rust_std::pin::Pin<&'a mut crate::NontrivialMembers>, + __this: ::std::pin::Pin<&'a mut crate::NontrivialMembers>, ); pub(crate) fn __rust_thunk___ZN17NontrivialMembersaSERKS_<'a, 'b>( - __this: crate::rust_std::pin::Pin<&'a mut crate::NontrivialMembers>, + __this: ::std::pin::Pin<&'a mut crate::NontrivialMembers>, __param_0: &'b crate::NontrivialMembers, - ) -> crate::rust_std::pin::Pin<&'a mut crate::NontrivialMembers>; + ) -> ::std::pin::Pin<&'a mut crate::NontrivialMembers>; pub(crate) fn __rust_thunk___ZN17NontrivialMembersaSEOS_<'a, 'b>( - __this: crate::rust_std::pin::Pin<&'a mut crate::NontrivialMembers>, - __param_0: ctor::RvalueReference<'b, crate::NontrivialMembers>, - ) -> crate::rust_std::pin::Pin<&'a mut crate::NontrivialMembers>; + __this: ::std::pin::Pin<&'a mut crate::NontrivialMembers>, + __param_0: ::ctor::RvalueReference<'b, crate::NontrivialMembers>, + ) -> ::std::pin::Pin<&'a mut crate::NontrivialMembers>; #[link_name = "_ZN15NontrivialUnpinC1Ev"] pub(crate) fn __rust_thunk___ZN15NontrivialUnpinC1Ev<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::NontrivialUnpin>, + __this: &'a mut ::std::mem::MaybeUninit<crate::NontrivialUnpin>, ); #[link_name = "_ZN15NontrivialUnpinC1ERKS_"] pub(crate) fn __rust_thunk___ZN15NontrivialUnpinC1ERKS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::NontrivialUnpin>, + __this: &'a mut ::std::mem::MaybeUninit<crate::NontrivialUnpin>, __param_0: &'b crate::NontrivialUnpin, ); #[link_name = "_ZN15NontrivialUnpinC1EOS_"] pub(crate) fn __rust_thunk___ZN15NontrivialUnpinC1EOS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::NontrivialUnpin>, - __param_0: ctor::RvalueReference<'b, crate::NontrivialUnpin>, + __this: &'a mut ::std::mem::MaybeUninit<crate::NontrivialUnpin>, + __param_0: ::ctor::RvalueReference<'b, crate::NontrivialUnpin>, ); #[link_name = "_ZN15NontrivialUnpinC1EO10Nontrivial"] pub(crate) fn __rust_thunk___ZN15NontrivialUnpinC1EO10Nontrivial<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::NontrivialUnpin>, - __param_0: ctor::RvalueReference<'b, crate::Nontrivial>, + __this: &'a mut ::std::mem::MaybeUninit<crate::NontrivialUnpin>, + __param_0: ::ctor::RvalueReference<'b, crate::Nontrivial>, ); #[link_name = "_ZN15NontrivialUnpinD1Ev"] pub(crate) fn __rust_thunk___ZN15NontrivialUnpinD1Ev<'a>( @@ -810,8 +814,8 @@ ) -> &'a crate::Nontrivial; #[link_name = "_Z16TakesByReferenceR10Nontrivial"] pub(crate) fn __rust_thunk___Z16TakesByReferenceR10Nontrivial<'a>( - nontrivial: crate::rust_std::pin::Pin<&'a mut crate::Nontrivial>, - ) -> crate::rust_std::pin::Pin<&'a mut crate::Nontrivial>; + nontrivial: ::std::pin::Pin<&'a mut crate::Nontrivial>, + ) -> ::std::pin::Pin<&'a mut crate::Nontrivial>; #[link_name = "_Z26TakesByConstReferenceUnpinRK15NontrivialUnpin"] pub(crate) fn __rust_thunk___Z26TakesByConstReferenceUnpinRK15NontrivialUnpin<'a>( nontrivial: &'a crate::NontrivialUnpin, @@ -821,24 +825,24 @@ nontrivial: &'a mut crate::NontrivialUnpin, ) -> &'a mut crate::NontrivialUnpin; pub(crate) fn __rust_thunk___ZN17NontrivialByValueC1Ev<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::NontrivialByValue>, + __this: &'a mut ::std::mem::MaybeUninit<crate::NontrivialByValue>, ); pub(crate) fn __rust_thunk___ZN17NontrivialByValueC1ERKS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::NontrivialByValue>, + __this: &'a mut ::std::mem::MaybeUninit<crate::NontrivialByValue>, __param_0: &'b crate::NontrivialByValue, ); #[link_name = "_ZN17NontrivialByValueaSES_"] pub(crate) fn __rust_thunk___ZN17NontrivialByValueaSES_<'a>( - __this: crate::rust_std::pin::Pin<&'a mut crate::NontrivialByValue>, + __this: ::std::pin::Pin<&'a mut crate::NontrivialByValue>, other: crate::NontrivialByValue, ) -> crate::NontrivialByValue; } } -const _: () = assert!(rust_std::mem::size_of::<Option<&i32>>() == rust_std::mem::size_of::<&i32>()); +const _: () = assert!(::std::mem::size_of::<Option<&i32>>() == ::std::mem::size_of::<&i32>()); -const _: () = assert!(rust_std::mem::size_of::<crate::Nontrivial>() == 4); -const _: () = assert!(rust_std::mem::align_of::<crate::Nontrivial>() == 4); +const _: () = assert!(::std::mem::size_of::<crate::Nontrivial>() == 4); +const _: () = assert!(::std::mem::align_of::<crate::Nontrivial>() == 4); const _: () = { static_assertions::assert_not_impl_any!(crate::Nontrivial: Copy); }; @@ -850,8 +854,8 @@ static_assertions::assert_impl_all!(i32: Copy); }; -const _: () = assert!(rust_std::mem::size_of::<crate::NontrivialInline>() == 4); -const _: () = assert!(rust_std::mem::align_of::<crate::NontrivialInline>() == 4); +const _: () = assert!(::std::mem::size_of::<crate::NontrivialInline>() == 4); +const _: () = assert!(::std::mem::align_of::<crate::NontrivialInline>() == 4); const _: () = { static_assertions::assert_not_impl_any!(crate::NontrivialInline: Copy); }; @@ -863,8 +867,8 @@ static_assertions::assert_impl_all!(i32: Copy); }; -const _: () = assert!(rust_std::mem::size_of::<crate::NontrivialMembers>() == 4); -const _: () = assert!(rust_std::mem::align_of::<crate::NontrivialMembers>() == 4); +const _: () = assert!(::std::mem::size_of::<crate::NontrivialMembers>() == 4); +const _: () = assert!(::std::mem::align_of::<crate::NontrivialMembers>() == 4); const _: () = { static_assertions::assert_not_impl_any!(crate::NontrivialMembers: Copy); }; @@ -874,8 +878,8 @@ const _: () = assert!(memoffset_unstable_const::offset_of!(crate::NontrivialMembers, nontrivial_member) == 0); -const _: () = assert!(rust_std::mem::size_of::<crate::NontrivialUnpin>() == 4); -const _: () = assert!(rust_std::mem::align_of::<crate::NontrivialUnpin>() == 4); +const _: () = assert!(::std::mem::size_of::<crate::NontrivialUnpin>() == 4); +const _: () = assert!(::std::mem::align_of::<crate::NontrivialUnpin>() == 4); const _: () = { static_assertions::assert_not_impl_any!(crate::NontrivialUnpin: Copy); }; @@ -887,8 +891,8 @@ static_assertions::assert_impl_all!(i32: Copy); }; -const _: () = assert!(rust_std::mem::size_of::<crate::NontrivialByValue>() == 1); -const _: () = assert!(rust_std::mem::align_of::<crate::NontrivialByValue>() == 1); +const _: () = assert!(::std::mem::size_of::<crate::NontrivialByValue>() == 1); +const _: () = assert!(::std::mem::align_of::<crate::NontrivialByValue>() == 1); const _: () = { static_assertions::assert_not_impl_any!(crate::NontrivialByValue: Copy); };
diff --git a/rs_bindings_from_cc/test/golden/polymorphic_rs_api.rs b/rs_bindings_from_cc/test/golden/polymorphic_rs_api.rs index 2c3f2ac..a3515e8 100644 --- a/rs_bindings_from_cc/test/golden/polymorphic_rs_api.rs +++ b/rs_bindings_from_cc/test/golden/polymorphic_rs_api.rs
@@ -11,67 +11,62 @@ #![allow(non_upper_case_globals)] #![deny(warnings)] -use ::std as rust_std; - // Part of the Crubit project, under the Apache License v2.0 with LLVM // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#[ctor::recursively_pinned(PinnedDrop)] +#[::ctor::recursively_pinned(PinnedDrop)] #[repr(C, align(8))] pub struct PolymorphicBase { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 8], + __non_field_data: [::std::mem::MaybeUninit<u8>; 8], } forward_declare::unsafe_define!( forward_declare::symbol!("PolymorphicBase"), crate::PolymorphicBase ); -impl ctor::CtorNew<()> for PolymorphicBase { - type CtorType = impl ctor::Ctor<Output = Self>; +impl ::ctor::CtorNew<()> for PolymorphicBase { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: ()) -> Self::CtorType { let () = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN15PolymorphicBaseC1Ev( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), ); }, ) } } -impl<'b> ctor::CtorNew<&'b crate::PolymorphicBase> for PolymorphicBase { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<&'b crate::PolymorphicBase> for PolymorphicBase { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: &'b crate::PolymorphicBase) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN15PolymorphicBaseC1ERKS_( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), __param_0, ); }, ) } } -impl<'b> ctor::CtorNew<(&'b crate::PolymorphicBase,)> for PolymorphicBase { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<(&'b crate::PolymorphicBase,)> for PolymorphicBase { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: (&'b crate::PolymorphicBase,)) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<&'b crate::PolymorphicBase>>::ctor_new(arg) + <Self as ::ctor::CtorNew<&'b crate::PolymorphicBase>>::ctor_new(arg) } } impl<'b> ::ctor::Assign<&'b crate::PolymorphicBase> for PolymorphicBase { #[inline(always)] - fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, - __param_0: &'b crate::PolymorphicBase, - ) { + fn assign<'a>(self: ::std::pin::Pin<&'a mut Self>, __param_0: &'b crate::PolymorphicBase) { unsafe { crate::detail::__rust_thunk___ZN15PolymorphicBaseaSERKS_(self, __param_0); } @@ -80,66 +75,63 @@ impl ::ctor::PinnedDrop for PolymorphicBase { #[inline(always)] - unsafe fn pinned_drop<'a>(self: crate::rust_std::pin::Pin<&'a mut Self>) { + unsafe fn pinned_drop<'a>(self: ::std::pin::Pin<&'a mut Self>) { crate::detail::__rust_thunk___ZN15PolymorphicBaseD1Ev(self) } } -#[ctor::recursively_pinned(PinnedDrop)] +#[::ctor::recursively_pinned(PinnedDrop)] #[repr(C, align(8))] pub struct PolymorphicBase2 { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 8], + __non_field_data: [::std::mem::MaybeUninit<u8>; 8], } forward_declare::unsafe_define!( forward_declare::symbol!("PolymorphicBase2"), crate::PolymorphicBase2 ); -impl ctor::CtorNew<()> for PolymorphicBase2 { - type CtorType = impl ctor::Ctor<Output = Self>; +impl ::ctor::CtorNew<()> for PolymorphicBase2 { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: ()) -> Self::CtorType { let () = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN16PolymorphicBase2C1Ev( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), ); }, ) } } -impl<'b> ctor::CtorNew<&'b crate::PolymorphicBase2> for PolymorphicBase2 { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<&'b crate::PolymorphicBase2> for PolymorphicBase2 { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: &'b crate::PolymorphicBase2) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN16PolymorphicBase2C1ERKS_( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), __param_0, ); }, ) } } -impl<'b> ctor::CtorNew<(&'b crate::PolymorphicBase2,)> for PolymorphicBase2 { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<(&'b crate::PolymorphicBase2,)> for PolymorphicBase2 { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: (&'b crate::PolymorphicBase2,)) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<&'b crate::PolymorphicBase2>>::ctor_new(arg) + <Self as ::ctor::CtorNew<&'b crate::PolymorphicBase2>>::ctor_new(arg) } } impl<'b> ::ctor::Assign<&'b crate::PolymorphicBase2> for PolymorphicBase2 { #[inline(always)] - fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, - __param_0: &'b crate::PolymorphicBase2, - ) { + fn assign<'a>(self: ::std::pin::Pin<&'a mut Self>, __param_0: &'b crate::PolymorphicBase2) { unsafe { crate::detail::__rust_thunk___ZN16PolymorphicBase2aSERKS_(self, __param_0); } @@ -148,121 +140,120 @@ impl PolymorphicBase2 { #[inline(always)] - pub fn Foo<'a>(self: crate::rust_std::pin::Pin<&'a mut Self>) { + pub fn Foo<'a>(self: ::std::pin::Pin<&'a mut Self>) { unsafe { crate::detail::__rust_thunk___ZN16PolymorphicBase23FooEv(self) } } } impl ::ctor::PinnedDrop for PolymorphicBase2 { #[inline(always)] - unsafe fn pinned_drop<'a>(self: crate::rust_std::pin::Pin<&'a mut Self>) { + unsafe fn pinned_drop<'a>(self: ::std::pin::Pin<&'a mut Self>) { crate::detail::__rust_thunk___ZN16PolymorphicBase2D1Ev(self) } } -#[ctor::recursively_pinned(PinnedDrop)] +#[::ctor::recursively_pinned(PinnedDrop)] #[repr(C, align(8))] pub struct PolymorphicDerived { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 16], + __non_field_data: [::std::mem::MaybeUninit<u8>; 16], } forward_declare::unsafe_define!( forward_declare::symbol!("PolymorphicDerived"), crate::PolymorphicDerived ); -impl ctor::CtorNew<()> for PolymorphicDerived { - type CtorType = impl ctor::Ctor<Output = Self>; +impl ::ctor::CtorNew<()> for PolymorphicDerived { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: ()) -> Self::CtorType { let () = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN18PolymorphicDerivedC1Ev( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), ); }, ) } } -impl<'b> ctor::CtorNew<&'b crate::PolymorphicDerived> for PolymorphicDerived { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<&'b crate::PolymorphicDerived> for PolymorphicDerived { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: &'b crate::PolymorphicDerived) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN18PolymorphicDerivedC1ERKS_( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), __param_0, ); }, ) } } -impl<'b> ctor::CtorNew<(&'b crate::PolymorphicDerived,)> for PolymorphicDerived { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<(&'b crate::PolymorphicDerived,)> for PolymorphicDerived { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: (&'b crate::PolymorphicDerived,)) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<&'b crate::PolymorphicDerived>>::ctor_new(arg) + <Self as ::ctor::CtorNew<&'b crate::PolymorphicDerived>>::ctor_new(arg) } } -impl<'b> ctor::CtorNew<ctor::RvalueReference<'b, crate::PolymorphicDerived>> +impl<'b> ::ctor::CtorNew<::ctor::RvalueReference<'b, crate::PolymorphicDerived>> for PolymorphicDerived { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] - fn ctor_new(args: ctor::RvalueReference<'b, crate::PolymorphicDerived>) -> Self::CtorType { + fn ctor_new(args: ::ctor::RvalueReference<'b, crate::PolymorphicDerived>) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN18PolymorphicDerivedC1EOS_( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), __param_0, ); }, ) } } -impl<'b> ctor::CtorNew<(ctor::RvalueReference<'b, crate::PolymorphicDerived>,)> +impl<'b> ::ctor::CtorNew<(::ctor::RvalueReference<'b, crate::PolymorphicDerived>,)> for PolymorphicDerived { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] - fn ctor_new(args: (ctor::RvalueReference<'b, crate::PolymorphicDerived>,)) -> Self::CtorType { + fn ctor_new(args: (::ctor::RvalueReference<'b, crate::PolymorphicDerived>,)) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<ctor::RvalueReference<'b, crate::PolymorphicDerived>>>::ctor_new(arg) + <Self as ::ctor::CtorNew<::ctor::RvalueReference<'b, crate::PolymorphicDerived>>>::ctor_new( + arg, + ) } } impl ::ctor::PinnedDrop for PolymorphicDerived { #[inline(always)] - unsafe fn pinned_drop<'a>(self: crate::rust_std::pin::Pin<&'a mut Self>) { + unsafe fn pinned_drop<'a>(self: ::std::pin::Pin<&'a mut Self>) { crate::detail::__rust_thunk___ZN18PolymorphicDerivedD1Ev(self) } } impl<'b> ::ctor::Assign<&'b crate::PolymorphicDerived> for PolymorphicDerived { #[inline(always)] - fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, - __param_0: &'b crate::PolymorphicDerived, - ) { + fn assign<'a>(self: ::std::pin::Pin<&'a mut Self>, __param_0: &'b crate::PolymorphicDerived) { unsafe { crate::detail::__rust_thunk___ZN18PolymorphicDerivedaSERKS_(self, __param_0); } } } -impl<'b> ::ctor::Assign<ctor::RvalueReference<'b, crate::PolymorphicDerived>> +impl<'b> ::ctor::Assign<::ctor::RvalueReference<'b, crate::PolymorphicDerived>> for PolymorphicDerived { #[inline(always)] fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, - __param_0: ctor::RvalueReference<'b, crate::PolymorphicDerived>, + self: ::std::pin::Pin<&'a mut Self>, + __param_0: ::ctor::RvalueReference<'b, crate::PolymorphicDerived>, ) { unsafe { crate::detail::__rust_thunk___ZN18PolymorphicDerivedaSEOS_(self, __param_0); @@ -277,65 +268,65 @@ use super::*; extern "C" { pub(crate) fn __rust_thunk___ZN15PolymorphicBaseC1Ev<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::PolymorphicBase>, + __this: &'a mut ::std::mem::MaybeUninit<crate::PolymorphicBase>, ); pub(crate) fn __rust_thunk___ZN15PolymorphicBaseC1ERKS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::PolymorphicBase>, + __this: &'a mut ::std::mem::MaybeUninit<crate::PolymorphicBase>, __param_0: &'b crate::PolymorphicBase, ); pub(crate) fn __rust_thunk___ZN15PolymorphicBaseaSERKS_<'a, 'b>( - __this: crate::rust_std::pin::Pin<&'a mut crate::PolymorphicBase>, + __this: ::std::pin::Pin<&'a mut crate::PolymorphicBase>, __param_0: &'b crate::PolymorphicBase, - ) -> crate::rust_std::pin::Pin<&'a mut crate::PolymorphicBase>; + ) -> ::std::pin::Pin<&'a mut crate::PolymorphicBase>; pub(crate) fn __rust_thunk___ZN15PolymorphicBaseD1Ev<'a>( - __this: crate::rust_std::pin::Pin<&'a mut crate::PolymorphicBase>, + __this: ::std::pin::Pin<&'a mut crate::PolymorphicBase>, ); pub(crate) fn __rust_thunk___ZN16PolymorphicBase2C1Ev<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::PolymorphicBase2>, + __this: &'a mut ::std::mem::MaybeUninit<crate::PolymorphicBase2>, ); pub(crate) fn __rust_thunk___ZN16PolymorphicBase2C1ERKS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::PolymorphicBase2>, + __this: &'a mut ::std::mem::MaybeUninit<crate::PolymorphicBase2>, __param_0: &'b crate::PolymorphicBase2, ); pub(crate) fn __rust_thunk___ZN16PolymorphicBase2aSERKS_<'a, 'b>( - __this: crate::rust_std::pin::Pin<&'a mut crate::PolymorphicBase2>, + __this: ::std::pin::Pin<&'a mut crate::PolymorphicBase2>, __param_0: &'b crate::PolymorphicBase2, - ) -> crate::rust_std::pin::Pin<&'a mut crate::PolymorphicBase2>; + ) -> ::std::pin::Pin<&'a mut crate::PolymorphicBase2>; pub(crate) fn __rust_thunk___ZN16PolymorphicBase23FooEv<'a>( - __this: crate::rust_std::pin::Pin<&'a mut crate::PolymorphicBase2>, + __this: ::std::pin::Pin<&'a mut crate::PolymorphicBase2>, ); pub(crate) fn __rust_thunk___ZN16PolymorphicBase2D1Ev<'a>( - __this: crate::rust_std::pin::Pin<&'a mut crate::PolymorphicBase2>, + __this: ::std::pin::Pin<&'a mut crate::PolymorphicBase2>, ); pub(crate) fn __rust_thunk___ZN18PolymorphicDerivedC1Ev<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::PolymorphicDerived>, + __this: &'a mut ::std::mem::MaybeUninit<crate::PolymorphicDerived>, ); pub(crate) fn __rust_thunk___ZN18PolymorphicDerivedC1ERKS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::PolymorphicDerived>, + __this: &'a mut ::std::mem::MaybeUninit<crate::PolymorphicDerived>, __param_0: &'b crate::PolymorphicDerived, ); pub(crate) fn __rust_thunk___ZN18PolymorphicDerivedC1EOS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::PolymorphicDerived>, - __param_0: ctor::RvalueReference<'b, crate::PolymorphicDerived>, + __this: &'a mut ::std::mem::MaybeUninit<crate::PolymorphicDerived>, + __param_0: ::ctor::RvalueReference<'b, crate::PolymorphicDerived>, ); pub(crate) fn __rust_thunk___ZN18PolymorphicDerivedD1Ev<'a>( - __this: crate::rust_std::pin::Pin<&'a mut crate::PolymorphicDerived>, + __this: ::std::pin::Pin<&'a mut crate::PolymorphicDerived>, ); pub(crate) fn __rust_thunk___ZN18PolymorphicDerivedaSERKS_<'a, 'b>( - __this: crate::rust_std::pin::Pin<&'a mut crate::PolymorphicDerived>, + __this: ::std::pin::Pin<&'a mut crate::PolymorphicDerived>, __param_0: &'b crate::PolymorphicDerived, - ) -> crate::rust_std::pin::Pin<&'a mut crate::PolymorphicDerived>; + ) -> ::std::pin::Pin<&'a mut crate::PolymorphicDerived>; pub(crate) fn __rust_thunk___ZN18PolymorphicDerivedaSEOS_<'a, 'b>( - __this: crate::rust_std::pin::Pin<&'a mut crate::PolymorphicDerived>, - __param_0: ctor::RvalueReference<'b, crate::PolymorphicDerived>, - ) -> crate::rust_std::pin::Pin<&'a mut crate::PolymorphicDerived>; + __this: ::std::pin::Pin<&'a mut crate::PolymorphicDerived>, + __param_0: ::ctor::RvalueReference<'b, crate::PolymorphicDerived>, + ) -> ::std::pin::Pin<&'a mut crate::PolymorphicDerived>; } } -const _: () = assert!(rust_std::mem::size_of::<Option<&i32>>() == rust_std::mem::size_of::<&i32>()); +const _: () = assert!(::std::mem::size_of::<Option<&i32>>() == ::std::mem::size_of::<&i32>()); -const _: () = assert!(rust_std::mem::size_of::<crate::PolymorphicBase>() == 8); -const _: () = assert!(rust_std::mem::align_of::<crate::PolymorphicBase>() == 8); +const _: () = assert!(::std::mem::size_of::<crate::PolymorphicBase>() == 8); +const _: () = assert!(::std::mem::align_of::<crate::PolymorphicBase>() == 8); const _: () = { static_assertions::assert_not_impl_any!(crate::PolymorphicBase: Copy); }; @@ -343,8 +334,8 @@ static_assertions::assert_impl_all!(crate::PolymorphicBase: Drop); }; -const _: () = assert!(rust_std::mem::size_of::<crate::PolymorphicBase2>() == 8); -const _: () = assert!(rust_std::mem::align_of::<crate::PolymorphicBase2>() == 8); +const _: () = assert!(::std::mem::size_of::<crate::PolymorphicBase2>() == 8); +const _: () = assert!(::std::mem::align_of::<crate::PolymorphicBase2>() == 8); const _: () = { static_assertions::assert_not_impl_any!(crate::PolymorphicBase2: Copy); }; @@ -352,8 +343,8 @@ static_assertions::assert_impl_all!(crate::PolymorphicBase2: Drop); }; -const _: () = assert!(rust_std::mem::size_of::<crate::PolymorphicDerived>() == 16); -const _: () = assert!(rust_std::mem::align_of::<crate::PolymorphicDerived>() == 8); +const _: () = assert!(::std::mem::size_of::<crate::PolymorphicDerived>() == 16); +const _: () = assert!(::std::mem::align_of::<crate::PolymorphicDerived>() == 8); const _: () = { static_assertions::assert_not_impl_any!(crate::PolymorphicDerived: Copy); };
diff --git a/rs_bindings_from_cc/test/golden/private_members_rs_api.rs b/rs_bindings_from_cc/test/golden/private_members_rs_api.rs index dd48888..a5c60c1 100644 --- a/rs_bindings_from_cc/test/golden/private_members_rs_api.rs +++ b/rs_bindings_from_cc/test/golden/private_members_rs_api.rs
@@ -11,8 +11,6 @@ #![allow(non_upper_case_globals)] #![deny(warnings)] -use ::std as rust_std; - // Part of the Crubit project, under the Apache License v2.0 with LLVM // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception @@ -21,11 +19,11 @@ #[derive(Clone, Copy)] #[repr(C, align(4))] pub struct SomeClass { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 0], + __non_field_data: [::std::mem::MaybeUninit<u8>; 0], pub public_member_variable_: i32, /// Reason for representing this field as a blob of bytes: /// Types of non-public C++ fields can be elided away - pub(crate) private_member_variable_: [crate::rust_std::mem::MaybeUninit<u8>; 4], + pub(crate) private_member_variable_: [::std::mem::MaybeUninit<u8>; 4], } forward_declare::unsafe_define!( forward_declare::symbol!("SomeClass"), @@ -35,7 +33,7 @@ impl Default for SomeClass { #[inline(always)] fn default() -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN23test_namespace_bindings9SomeClassC1Ev(&mut tmp); tmp.assume_init() @@ -43,12 +41,14 @@ } } - impl<'b> From<ctor::RvalueReference<'b, crate::test_namespace_bindings::SomeClass>> for SomeClass { + impl<'b> From<::ctor::RvalueReference<'b, crate::test_namespace_bindings::SomeClass>> + for SomeClass + { #[inline(always)] fn from( - __param_0: ctor::RvalueReference<'b, crate::test_namespace_bindings::SomeClass>, + __param_0: ::ctor::RvalueReference<'b, crate::test_namespace_bindings::SomeClass>, ) -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN23test_namespace_bindings9SomeClassC1EOS0_( &mut tmp, __param_0, @@ -96,15 +96,11 @@ use super::*; extern "C" { pub(crate) fn __rust_thunk___ZN23test_namespace_bindings9SomeClassC1Ev<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit< - crate::test_namespace_bindings::SomeClass, - >, + __this: &'a mut ::std::mem::MaybeUninit<crate::test_namespace_bindings::SomeClass>, ); pub(crate) fn __rust_thunk___ZN23test_namespace_bindings9SomeClassC1EOS0_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit< - crate::test_namespace_bindings::SomeClass, - >, - __param_0: ctor::RvalueReference<'b, crate::test_namespace_bindings::SomeClass>, + __this: &'a mut ::std::mem::MaybeUninit<crate::test_namespace_bindings::SomeClass>, + __param_0: ::ctor::RvalueReference<'b, crate::test_namespace_bindings::SomeClass>, ); #[link_name = "_ZN23test_namespace_bindings9SomeClass13public_methodEv"] pub(crate) fn __rust_thunk___ZN23test_namespace_bindings9SomeClass13public_methodEv<'a>( @@ -115,10 +111,10 @@ } } -const _: () = assert!(rust_std::mem::size_of::<Option<&i32>>() == rust_std::mem::size_of::<&i32>()); +const _: () = assert!(::std::mem::size_of::<Option<&i32>>() == ::std::mem::size_of::<&i32>()); -const _: () = assert!(rust_std::mem::size_of::<crate::test_namespace_bindings::SomeClass>() == 8); -const _: () = assert!(rust_std::mem::align_of::<crate::test_namespace_bindings::SomeClass>() == 4); +const _: () = assert!(::std::mem::size_of::<crate::test_namespace_bindings::SomeClass>() == 8); +const _: () = assert!(::std::mem::align_of::<crate::test_namespace_bindings::SomeClass>() == 4); const _: () = { static_assertions::assert_impl_all!(crate::test_namespace_bindings::SomeClass: Clone); };
diff --git a/rs_bindings_from_cc/test/golden/static_methods_rs_api.rs b/rs_bindings_from_cc/test/golden/static_methods_rs_api.rs index de25295..1a261a1 100644 --- a/rs_bindings_from_cc/test/golden/static_methods_rs_api.rs +++ b/rs_bindings_from_cc/test/golden/static_methods_rs_api.rs
@@ -11,8 +11,6 @@ #![allow(non_upper_case_globals)] #![deny(warnings)] -use ::std as rust_std; - // Part of the Crubit project, under the Apache License v2.0 with LLVM // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception @@ -20,17 +18,17 @@ #[derive(Clone, Copy)] #[repr(C, align(4))] pub struct SomeClass { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 0], + __non_field_data: [::std::mem::MaybeUninit<u8>; 0], /// Reason for representing this field as a blob of bytes: /// Types of non-public C++ fields can be elided away - pub(crate) field_: [crate::rust_std::mem::MaybeUninit<u8>; 4], + pub(crate) field_: [::std::mem::MaybeUninit<u8>; 4], } forward_declare::unsafe_define!(forward_declare::symbol!("SomeClass"), crate::SomeClass); impl Default for SomeClass { #[inline(always)] fn default() -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN9SomeClassC1Ev(&mut tmp); tmp.assume_init() @@ -38,10 +36,10 @@ } } -impl<'b> From<ctor::RvalueReference<'b, crate::SomeClass>> for SomeClass { +impl<'b> From<::ctor::RvalueReference<'b, crate::SomeClass>> for SomeClass { #[inline(always)] - fn from(__param_0: ctor::RvalueReference<'b, crate::SomeClass>) -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + fn from(__param_0: ::ctor::RvalueReference<'b, crate::SomeClass>) -> Self { + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN9SomeClassC1EOS_(&mut tmp, __param_0); tmp.assume_init() @@ -88,11 +86,11 @@ use super::*; extern "C" { pub(crate) fn __rust_thunk___ZN9SomeClassC1Ev<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::SomeClass>, + __this: &'a mut ::std::mem::MaybeUninit<crate::SomeClass>, ); pub(crate) fn __rust_thunk___ZN9SomeClassC1EOS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::SomeClass>, - __param_0: ctor::RvalueReference<'b, crate::SomeClass>, + __this: &'a mut ::std::mem::MaybeUninit<crate::SomeClass>, + __param_0: ::ctor::RvalueReference<'b, crate::SomeClass>, ); #[link_name = "_ZN9SomeClass21static_factory_methodEi"] pub(crate) fn __rust_thunk___ZN9SomeClass21static_factory_methodEi( @@ -106,10 +104,10 @@ } } -const _: () = assert!(rust_std::mem::size_of::<Option<&i32>>() == rust_std::mem::size_of::<&i32>()); +const _: () = assert!(::std::mem::size_of::<Option<&i32>>() == ::std::mem::size_of::<&i32>()); -const _: () = assert!(rust_std::mem::size_of::<crate::SomeClass>() == 4); -const _: () = assert!(rust_std::mem::align_of::<crate::SomeClass>() == 4); +const _: () = assert!(::std::mem::size_of::<crate::SomeClass>() == 4); +const _: () = assert!(::std::mem::align_of::<crate::SomeClass>() == 4); const _: () = { static_assertions::assert_impl_all!(crate::SomeClass: Clone); };
diff --git a/rs_bindings_from_cc/test/golden/templates_rs_api.rs b/rs_bindings_from_cc/test/golden/templates_rs_api.rs index 0ff46be..f745a4b 100644 --- a/rs_bindings_from_cc/test/golden/templates_rs_api.rs +++ b/rs_bindings_from_cc/test/golden/templates_rs_api.rs
@@ -11,99 +11,94 @@ #![allow(non_upper_case_globals)] #![deny(warnings)] -use ::std as rust_std; - // Part of the Crubit project, under the Apache License v2.0 with LLVM // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#[ctor::recursively_pinned] +#[::ctor::recursively_pinned] #[repr(C)] pub struct DifferentScope { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 1], + __non_field_data: [::std::mem::MaybeUninit<u8>; 1], } forward_declare::unsafe_define!(forward_declare::symbol!("DifferentScope"), crate::DifferentScope); -impl ctor::CtorNew<()> for DifferentScope { - type CtorType = impl ctor::Ctor<Output = Self>; +impl ::ctor::CtorNew<()> for DifferentScope { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: ()) -> Self::CtorType { let () = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN14DifferentScopeC1Ev( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), ); }, ) } } -impl<'b> ctor::CtorNew<&'b crate::DifferentScope> for DifferentScope { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<&'b crate::DifferentScope> for DifferentScope { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: &'b crate::DifferentScope) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN14DifferentScopeC1ERKS_( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), __param_0, ); }, ) } } -impl<'b> ctor::CtorNew<(&'b crate::DifferentScope,)> for DifferentScope { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<(&'b crate::DifferentScope,)> for DifferentScope { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: (&'b crate::DifferentScope,)) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<&'b crate::DifferentScope>>::ctor_new(arg) + <Self as ::ctor::CtorNew<&'b crate::DifferentScope>>::ctor_new(arg) } } -impl<'b> ctor::CtorNew<ctor::RvalueReference<'b, crate::DifferentScope>> for DifferentScope { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<::ctor::RvalueReference<'b, crate::DifferentScope>> for DifferentScope { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] - fn ctor_new(args: ctor::RvalueReference<'b, crate::DifferentScope>) -> Self::CtorType { + fn ctor_new(args: ::ctor::RvalueReference<'b, crate::DifferentScope>) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN14DifferentScopeC1EOS_( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), __param_0, ); }, ) } } -impl<'b> ctor::CtorNew<(ctor::RvalueReference<'b, crate::DifferentScope>,)> for DifferentScope { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<(::ctor::RvalueReference<'b, crate::DifferentScope>,)> for DifferentScope { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] - fn ctor_new(args: (ctor::RvalueReference<'b, crate::DifferentScope>,)) -> Self::CtorType { + fn ctor_new(args: (::ctor::RvalueReference<'b, crate::DifferentScope>,)) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<ctor::RvalueReference<'b, crate::DifferentScope>>>::ctor_new(arg) + <Self as ::ctor::CtorNew<::ctor::RvalueReference<'b, crate::DifferentScope>>>::ctor_new(arg) } } impl<'b> ::ctor::Assign<&'b crate::DifferentScope> for DifferentScope { #[inline(always)] - fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, - __param_0: &'b crate::DifferentScope, - ) { + fn assign<'a>(self: ::std::pin::Pin<&'a mut Self>, __param_0: &'b crate::DifferentScope) { unsafe { crate::detail::__rust_thunk___ZN14DifferentScopeaSERKS_(self, __param_0); } } } -impl<'b> ::ctor::Assign<ctor::RvalueReference<'b, crate::DifferentScope>> for DifferentScope { +impl<'b> ::ctor::Assign<::ctor::RvalueReference<'b, crate::DifferentScope>> for DifferentScope { #[inline(always)] fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, - __param_0: ctor::RvalueReference<'b, crate::DifferentScope>, + self: ::std::pin::Pin<&'a mut Self>, + __param_0: ::ctor::RvalueReference<'b, crate::DifferentScope>, ) { unsafe { crate::detail::__rust_thunk___ZN14DifferentScopeaSEOS_(self, __param_0); @@ -121,92 +116,87 @@ pub type OtherTypeAliasInSameTarget = crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE; - #[ctor::recursively_pinned] + #[::ctor::recursively_pinned] #[repr(C)] pub struct TemplateParam { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 1], + __non_field_data: [::std::mem::MaybeUninit<u8>; 1], } forward_declare::unsafe_define!( forward_declare::symbol!("TemplateParam"), crate::test_namespace_bindings::TemplateParam ); - impl ctor::CtorNew<()> for TemplateParam { - type CtorType = impl ctor::Ctor<Output = Self>; + impl ::ctor::CtorNew<()> for TemplateParam { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: ()) -> Self::CtorType { let () = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin< - &mut crate::rust_std::mem::MaybeUninit<Self>, - >| { - unsafe { - crate::detail::__rust_thunk___ZN23test_namespace_bindings13TemplateParamC1Ev(crate::rust_std::pin::Pin::into_inner_unchecked(dest)); - } + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { + crate::detail::__rust_thunk___ZN23test_namespace_bindings13TemplateParamC1Ev( + ::std::pin::Pin::into_inner_unchecked(dest), + ); }, ) } } - impl<'b> ctor::CtorNew<&'b crate::test_namespace_bindings::TemplateParam> for TemplateParam { - type CtorType = impl ctor::Ctor<Output = Self>; + impl<'b> ::ctor::CtorNew<&'b crate::test_namespace_bindings::TemplateParam> for TemplateParam { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: &'b crate::test_namespace_bindings::TemplateParam) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin< - &mut crate::rust_std::mem::MaybeUninit<Self>, - >| { - unsafe { - crate::detail::__rust_thunk___ZN23test_namespace_bindings13TemplateParamC1ERKS0_(crate::rust_std::pin::Pin::into_inner_unchecked(dest),__param_0); - } + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { + crate::detail::__rust_thunk___ZN23test_namespace_bindings13TemplateParamC1ERKS0_(::std::pin::Pin::into_inner_unchecked(dest),__param_0); }, ) } } - impl<'b> ctor::CtorNew<(&'b crate::test_namespace_bindings::TemplateParam,)> for TemplateParam { - type CtorType = impl ctor::Ctor<Output = Self>; + impl<'b> ::ctor::CtorNew<(&'b crate::test_namespace_bindings::TemplateParam,)> for TemplateParam { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: (&'b crate::test_namespace_bindings::TemplateParam,)) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<&'b crate::test_namespace_bindings::TemplateParam>>::ctor_new( + <Self as ::ctor::CtorNew<&'b crate::test_namespace_bindings::TemplateParam>>::ctor_new( arg, ) } } - impl<'b> ctor::CtorNew<ctor::RvalueReference<'b, crate::test_namespace_bindings::TemplateParam>> + impl<'b> + ::ctor::CtorNew<::ctor::RvalueReference<'b, crate::test_namespace_bindings::TemplateParam>> for TemplateParam { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new( - args: ctor::RvalueReference<'b, crate::test_namespace_bindings::TemplateParam>, + args: ::ctor::RvalueReference<'b, crate::test_namespace_bindings::TemplateParam>, ) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin< - &mut crate::rust_std::mem::MaybeUninit<Self>, - >| { - unsafe { - crate::detail::__rust_thunk___ZN23test_namespace_bindings13TemplateParamC1EOS0_(crate::rust_std::pin::Pin::into_inner_unchecked(dest),__param_0); - } + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { + crate::detail::__rust_thunk___ZN23test_namespace_bindings13TemplateParamC1EOS0_( + ::std::pin::Pin::into_inner_unchecked(dest), + __param_0, + ); }, ) } } impl<'b> - ctor::CtorNew<(ctor::RvalueReference<'b, crate::test_namespace_bindings::TemplateParam>,)> - for TemplateParam + ::ctor::CtorNew<( + ::ctor::RvalueReference<'b, crate::test_namespace_bindings::TemplateParam>, + )> for TemplateParam { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new( - args: (ctor::RvalueReference<'b, crate::test_namespace_bindings::TemplateParam>,), + args: (::ctor::RvalueReference<'b, crate::test_namespace_bindings::TemplateParam>,), ) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew< - ctor::RvalueReference<'b, crate::test_namespace_bindings::TemplateParam>, + <Self as ::ctor::CtorNew< + ::ctor::RvalueReference<'b, crate::test_namespace_bindings::TemplateParam>, >>::ctor_new(arg) } } @@ -214,7 +204,7 @@ impl<'b> ::ctor::Assign<&'b crate::test_namespace_bindings::TemplateParam> for TemplateParam { #[inline(always)] fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, + self: ::std::pin::Pin<&'a mut Self>, __param_0: &'b crate::test_namespace_bindings::TemplateParam, ) { unsafe { @@ -226,13 +216,13 @@ } impl<'b> - ::ctor::Assign<ctor::RvalueReference<'b, crate::test_namespace_bindings::TemplateParam>> + ::ctor::Assign<::ctor::RvalueReference<'b, crate::test_namespace_bindings::TemplateParam>> for TemplateParam { #[inline(always)] fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, - __param_0: ctor::RvalueReference<'b, crate::test_namespace_bindings::TemplateParam>, + self: ::std::pin::Pin<&'a mut Self>, + __param_0: ::ctor::RvalueReference<'b, crate::test_namespace_bindings::TemplateParam>, ) { unsafe { crate::detail::__rust_thunk___ZN23test_namespace_bindings13TemplateParamaSEOS0_( @@ -272,7 +262,7 @@ #[inline(always)] pub fn processForwardDeclaredSpecialization<'a>( - i: Option<crate::rust_std::pin::Pin<&'a mut crate::__CcTemplateInst18MyTopLevelTemplateIiE>>, + i: Option<::std::pin::Pin<&'a mut crate::__CcTemplateInst18MyTopLevelTemplateIiE>>, ) { unsafe { crate::detail::__rust_thunk___Z36processForwardDeclaredSpecializationP18MyTopLevelTemplateIiE(i) @@ -281,58 +271,58 @@ // THIRD_PARTY_CRUBIT_RS_BINDINGS_FROM_CC_TEST_GOLDEN_TEMPLATES_H_ -#[ctor::recursively_pinned] +#[::ctor::recursively_pinned] #[repr(C)] pub struct __CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 0], + __non_field_data: [::std::mem::MaybeUninit<u8>; 0], /// Reason for representing this field as a blob of bytes: /// Types of non-public C++ fields can be elided away - pub(crate) value_: [crate::rust_std::mem::MaybeUninit<u8>; 1], + pub(crate) value_: [::std::mem::MaybeUninit<u8>; 1], } forward_declare::unsafe_define!( forward_declare::symbol!("test_namespace_bindings::MyTemplate<DifferentScope>"), crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE ); -impl ctor::CtorNew<()> +impl ::ctor::CtorNew<()> for __CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: ()) -> Self::CtorType { let () = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { - crate::detail::__rust_thunk___ZN23test_namespace_bindings10MyTemplateI14DifferentScopeEC1Ev__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(crate::rust_std::pin::Pin::into_inner_unchecked(dest)); + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { + crate::detail::__rust_thunk___ZN23test_namespace_bindings10MyTemplateI14DifferentScopeEC1Ev__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(::std::pin::Pin::into_inner_unchecked(dest)); }, ) } } impl<'b> - ctor::CtorNew< + ::ctor::CtorNew< &'b crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE, > for __CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new( args: &'b crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE, ) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { - crate::detail::__rust_thunk___ZN23test_namespace_bindings10MyTemplateI14DifferentScopeEC1ERKS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(crate::rust_std::pin::Pin::into_inner_unchecked(dest),__param_0); + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { + crate::detail::__rust_thunk___ZN23test_namespace_bindings10MyTemplateI14DifferentScopeEC1ERKS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(::std::pin::Pin::into_inner_unchecked(dest),__param_0); }, ) } } impl<'b> - ctor::CtorNew<( + ::ctor::CtorNew<( &'b crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE, )> for __CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new( args: ( @@ -340,57 +330,57 @@ ), ) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew< + <Self as ::ctor::CtorNew< &'b crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE, >>::ctor_new(arg) } } impl<'b> - ctor::CtorNew< - ctor::RvalueReference< + ::ctor::CtorNew< + ::ctor::RvalueReference< 'b, crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE, >, > for __CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new( - args: ctor::RvalueReference< + args: ::ctor::RvalueReference< 'b, crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE, >, ) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { - crate::detail::__rust_thunk___ZN23test_namespace_bindings10MyTemplateI14DifferentScopeEC1EOS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(crate::rust_std::pin::Pin::into_inner_unchecked(dest),__param_0); + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { + crate::detail::__rust_thunk___ZN23test_namespace_bindings10MyTemplateI14DifferentScopeEC1EOS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(::std::pin::Pin::into_inner_unchecked(dest),__param_0); }, ) } } impl<'b> - ctor::CtorNew<( - ctor::RvalueReference< + ::ctor::CtorNew<( + ::ctor::RvalueReference< 'b, crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE, >, )> for __CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new( args: ( - ctor::RvalueReference< + ::ctor::RvalueReference< 'b, crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE, >, ), ) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew< - ctor::RvalueReference< + <Self as ::ctor::CtorNew< + ::ctor::RvalueReference< 'b, crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE, >, @@ -405,7 +395,7 @@ { #[inline(always)] fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, + self: ::std::pin::Pin<&'a mut Self>, __param_0:&'b crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE, ) { unsafe { @@ -416,7 +406,7 @@ impl<'b> ::ctor::Assign< - ctor::RvalueReference< + ::ctor::RvalueReference< 'b, crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE, >, @@ -424,8 +414,8 @@ { #[inline(always)] fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, - __param_0: ctor::RvalueReference< + self: ::std::pin::Pin<&'a mut Self>, + __param_0: ::ctor::RvalueReference< 'b, crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE, >, @@ -456,13 +446,13 @@ } } -#[ctor::recursively_pinned] +#[::ctor::recursively_pinned] #[repr(C)] pub struct __CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 0], + __non_field_data: [::std::mem::MaybeUninit<u8>; 0], /// Reason for representing this field as a blob of bytes: /// Types of non-public C++ fields can be elided away - pub(crate) value_: [crate::rust_std::mem::MaybeUninit<u8>; 1], + pub(crate) value_: [::std::mem::MaybeUninit<u8>; 1], } forward_declare::unsafe_define!( forward_declare::symbol!( @@ -471,45 +461,45 @@ crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE ); -impl ctor::CtorNew<()> +impl ::ctor::CtorNew<()> for __CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: ()) -> Self::CtorType { let () = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { - crate::detail::__rust_thunk___ZN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEC1Ev__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(crate::rust_std::pin::Pin::into_inner_unchecked(dest)); + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { + crate::detail::__rust_thunk___ZN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEC1Ev__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(::std::pin::Pin::into_inner_unchecked(dest)); }, ) } } impl<'b> - ctor::CtorNew< + ::ctor::CtorNew< &'b crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE, > for __CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new( args:&'b crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE, ) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { - crate::detail::__rust_thunk___ZN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEC1ERKS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(crate::rust_std::pin::Pin::into_inner_unchecked(dest),__param_0); + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { + crate::detail::__rust_thunk___ZN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEC1ERKS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(::std::pin::Pin::into_inner_unchecked(dest),__param_0); }, ) } } impl<'b> - ctor::CtorNew<( + ::ctor::CtorNew<( &'b crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE, )> for __CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new( args: ( @@ -517,57 +507,57 @@ ), ) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew< + <Self as ::ctor::CtorNew< &'b crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE, >>::ctor_new(arg) } } impl<'b> - ctor::CtorNew< - ctor::RvalueReference< + ::ctor::CtorNew< + ::ctor::RvalueReference< 'b, crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE, >, > for __CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new( - args: ctor::RvalueReference< + args: ::ctor::RvalueReference< 'b, crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE, >, ) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { - crate::detail::__rust_thunk___ZN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEC1EOS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(crate::rust_std::pin::Pin::into_inner_unchecked(dest),__param_0); + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { + crate::detail::__rust_thunk___ZN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEC1EOS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(::std::pin::Pin::into_inner_unchecked(dest),__param_0); }, ) } } impl<'b> - ctor::CtorNew<( - ctor::RvalueReference< + ::ctor::CtorNew<( + ::ctor::RvalueReference< 'b, crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE, >, )> for __CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new( args: ( - ctor::RvalueReference< + ::ctor::RvalueReference< 'b, crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE, >, ), ) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew< - ctor::RvalueReference< + <Self as ::ctor::CtorNew< + ::ctor::RvalueReference< 'b, crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE, >, @@ -582,7 +572,7 @@ { #[inline(always)] fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, + self: ::std::pin::Pin<&'a mut Self>, __param_0:&'b crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE, ) { unsafe { @@ -593,7 +583,7 @@ impl<'b> ::ctor::Assign< - ctor::RvalueReference< + ::ctor::RvalueReference< 'b, crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE, >, @@ -601,8 +591,8 @@ { #[inline(always)] fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, - __param_0: ctor::RvalueReference< + self: ::std::pin::Pin<&'a mut Self>, + __param_0: ::ctor::RvalueReference< 'b, crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE, >, @@ -633,108 +623,108 @@ } } -#[ctor::recursively_pinned] +#[::ctor::recursively_pinned] #[repr(C, align(4))] pub struct __CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 0], + __non_field_data: [::std::mem::MaybeUninit<u8>; 0], /// Reason for representing this field as a blob of bytes: /// Types of non-public C++ fields can be elided away - pub(crate) value_: [crate::rust_std::mem::MaybeUninit<u8>; 4], + pub(crate) value_: [::std::mem::MaybeUninit<u8>; 4], } forward_declare::unsafe_define!( forward_declare::symbol!("test_namespace_bindings::MyTemplate<int>"), crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE ); -impl ctor::CtorNew<()> for __CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE { - type CtorType = impl ctor::Ctor<Output = Self>; +impl ::ctor::CtorNew<()> for __CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: ()) -> Self::CtorType { let () = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { - crate::detail::__rust_thunk___ZN23test_namespace_bindings10MyTemplateIiEC1Ev__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(crate::rust_std::pin::Pin::into_inner_unchecked(dest)); + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { + crate::detail::__rust_thunk___ZN23test_namespace_bindings10MyTemplateIiEC1Ev__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(::std::pin::Pin::into_inner_unchecked(dest)); }, ) } } -impl<'b> ctor::CtorNew<&'b crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE> +impl<'b> ::ctor::CtorNew<&'b crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE> for __CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new( args: &'b crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE, ) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { - crate::detail::__rust_thunk___ZN23test_namespace_bindings10MyTemplateIiEC1ERKS1___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(crate::rust_std::pin::Pin::into_inner_unchecked(dest),__param_0); + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { + crate::detail::__rust_thunk___ZN23test_namespace_bindings10MyTemplateIiEC1ERKS1___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(::std::pin::Pin::into_inner_unchecked(dest),__param_0); }, ) } } -impl<'b> ctor::CtorNew<(&'b crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE,)> +impl<'b> ::ctor::CtorNew<(&'b crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE,)> for __CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new( args: (&'b crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE,), ) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew< + <Self as ::ctor::CtorNew< &'b crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE, >>::ctor_new(arg) } } impl<'b> - ctor::CtorNew< - ctor::RvalueReference< + ::ctor::CtorNew< + ::ctor::RvalueReference< 'b, crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE, >, > for __CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new( - args: ctor::RvalueReference< + args: ::ctor::RvalueReference< 'b, crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE, >, ) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { - crate::detail::__rust_thunk___ZN23test_namespace_bindings10MyTemplateIiEC1EOS1___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(crate::rust_std::pin::Pin::into_inner_unchecked(dest),__param_0); + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { + crate::detail::__rust_thunk___ZN23test_namespace_bindings10MyTemplateIiEC1EOS1___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(::std::pin::Pin::into_inner_unchecked(dest),__param_0); }, ) } } impl<'b> - ctor::CtorNew<( - ctor::RvalueReference< + ::ctor::CtorNew<( + ::ctor::RvalueReference< 'b, crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE, >, )> for __CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new( args: ( - ctor::RvalueReference< + ::ctor::RvalueReference< 'b, crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE, >, ), ) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew< - ctor::RvalueReference< + <Self as ::ctor::CtorNew< + ::ctor::RvalueReference< 'b, crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE, >, @@ -747,7 +737,7 @@ { #[inline(always)] fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, + self: ::std::pin::Pin<&'a mut Self>, __param_0: &'b crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE, ) { unsafe { @@ -758,7 +748,7 @@ impl<'b> ::ctor::Assign< - ctor::RvalueReference< + ::ctor::RvalueReference< 'b, crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE, >, @@ -766,8 +756,8 @@ { #[inline(always)] fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, - __param_0: ctor::RvalueReference< + self: ::std::pin::Pin<&'a mut Self>, + __param_0: ::ctor::RvalueReference< 'b, crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE, >, @@ -796,12 +786,12 @@ } } -#[ctor::recursively_pinned] +#[::ctor::recursively_pinned] #[repr(C, align(4))] pub struct __CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE { /// Reason for representing this field as a blob of bytes: /// Unsupported type 'struct test_namespace_bindings::TemplateWithTwoParams<int, int>': Unsupported type 'struct test_namespace_bindings::TemplateWithTwoParams<int, int>': No generated bindings found for 'TemplateWithTwoParams' - pub(crate) value1: [crate::rust_std::mem::MaybeUninit<u8>; 8], + pub(crate) value1: [::std::mem::MaybeUninit<u8>; 8], pub value2: i32, } forward_declare::unsafe_define!( @@ -811,93 +801,93 @@ crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE ); -impl ctor::CtorNew<()> +impl ::ctor::CtorNew<()> for __CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: ()) -> Self::CtorType { let () = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { - crate::detail::__rust_thunk___ZN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEC1Ev__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(crate::rust_std::pin::Pin::into_inner_unchecked(dest)); + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { + crate::detail::__rust_thunk___ZN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEC1Ev__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(::std::pin::Pin::into_inner_unchecked(dest)); }, ) } } impl<'b> - ctor::CtorNew< + ::ctor::CtorNew< &'b crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE, > for __CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new( args:&'b crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE, ) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { - crate::detail::__rust_thunk___ZN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEC1ERKS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(crate::rust_std::pin::Pin::into_inner_unchecked(dest),__param_0); + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { + crate::detail::__rust_thunk___ZN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEC1ERKS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(::std::pin::Pin::into_inner_unchecked(dest),__param_0); }, ) } } impl<'b> - ctor::CtorNew<( + ::ctor::CtorNew<( &'b crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE, )> for __CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new( args:(&'b crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE,), ) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<&'b crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE>>::ctor_new(arg) + <Self as::ctor::CtorNew<&'b crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE>>::ctor_new(arg) } } impl<'b> - ctor::CtorNew< - ctor::RvalueReference< + ::ctor::CtorNew< + ::ctor::RvalueReference< 'b, crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE, >, > for __CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new( - args: ctor::RvalueReference< + args: ::ctor::RvalueReference< 'b, crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE, >, ) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { - crate::detail::__rust_thunk___ZN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEC1EOS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(crate::rust_std::pin::Pin::into_inner_unchecked(dest),__param_0); + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { + crate::detail::__rust_thunk___ZN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEC1EOS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(::std::pin::Pin::into_inner_unchecked(dest),__param_0); }, ) } } impl<'b> - ctor::CtorNew<( - ctor::RvalueReference< + ::ctor::CtorNew<( + ::ctor::RvalueReference< 'b, crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE, >, )> for __CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new( - args:(ctor::RvalueReference<'b,crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE>,), + args:(::ctor::RvalueReference<'b,crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE>,), ) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<ctor::RvalueReference<'b,crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE>>>::ctor_new(arg) + <Self as::ctor::CtorNew<::ctor::RvalueReference<'b,crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE>>>::ctor_new(arg) } } @@ -908,7 +898,7 @@ { #[inline(always)] fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, + self: ::std::pin::Pin<&'a mut Self>, __param_0:&'b crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE, ) { unsafe { @@ -919,7 +909,7 @@ impl<'b> ::ctor::Assign< - ctor::RvalueReference< + ::ctor::RvalueReference< 'b, crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE, >, @@ -927,8 +917,8 @@ { #[inline(always)] fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, - __param_0: ctor::RvalueReference< + self: ::std::pin::Pin<&'a mut Self>, + __param_0: ::ctor::RvalueReference< 'b, crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE, >, @@ -939,7 +929,7 @@ } } -#[ctor::recursively_pinned] +#[::ctor::recursively_pinned] #[repr(C)] pub struct __CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE { pub value1: i32, @@ -950,98 +940,101 @@ crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE ); -impl ctor::CtorNew<()> for __CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE { - type CtorType = impl ctor::Ctor<Output = Self>; +impl ::ctor::CtorNew<()> + for __CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE +{ + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: ()) -> Self::CtorType { let () = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { - crate::detail::__rust_thunk___ZN23test_namespace_bindings21TemplateWithTwoParamsIifEC1Ev__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(crate::rust_std::pin::Pin::into_inner_unchecked(dest)); + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { + crate::detail::__rust_thunk___ZN23test_namespace_bindings21TemplateWithTwoParamsIifEC1Ev__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(::std::pin::Pin::into_inner_unchecked(dest)); }, ) } } impl<'b> - ctor::CtorNew<&'b crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE> - for __CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE + ::ctor::CtorNew< + &'b crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE, + > for __CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new( args: &'b crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE, ) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { - crate::detail::__rust_thunk___ZN23test_namespace_bindings21TemplateWithTwoParamsIifEC1ERKS1___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(crate::rust_std::pin::Pin::into_inner_unchecked(dest),__param_0); + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { + crate::detail::__rust_thunk___ZN23test_namespace_bindings21TemplateWithTwoParamsIifEC1ERKS1___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(::std::pin::Pin::into_inner_unchecked(dest),__param_0); }, ) } } impl<'b> - ctor::CtorNew<( + ::ctor::CtorNew<( &'b crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE, )> for __CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new( args: (&'b crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE,), ) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew< + <Self as ::ctor::CtorNew< &'b crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE, >>::ctor_new(arg) } } impl<'b> - ctor::CtorNew< - ctor::RvalueReference< + ::ctor::CtorNew< + ::ctor::RvalueReference< 'b, crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE, >, > for __CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new( - args: ctor::RvalueReference< + args: ::ctor::RvalueReference< 'b, crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE, >, ) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { - crate::detail::__rust_thunk___ZN23test_namespace_bindings21TemplateWithTwoParamsIifEC1EOS1___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(crate::rust_std::pin::Pin::into_inner_unchecked(dest),__param_0); + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { + crate::detail::__rust_thunk___ZN23test_namespace_bindings21TemplateWithTwoParamsIifEC1EOS1___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(::std::pin::Pin::into_inner_unchecked(dest),__param_0); }, ) } } impl<'b> - ctor::CtorNew<( - ctor::RvalueReference< + ::ctor::CtorNew<( + ::ctor::RvalueReference< 'b, crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE, >, )> for __CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new( args: ( - ctor::RvalueReference< + ::ctor::RvalueReference< 'b, crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE, >, ), ) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew< - ctor::RvalueReference< + <Self as ::ctor::CtorNew< + ::ctor::RvalueReference< 'b, crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE, >, @@ -1056,7 +1049,7 @@ { #[inline(always)] fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, + self: ::std::pin::Pin<&'a mut Self>, __param_0:&'b crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE, ) { unsafe { @@ -1067,7 +1060,7 @@ impl<'b> ::ctor::Assign< - ctor::RvalueReference< + ::ctor::RvalueReference< 'b, crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE, >, @@ -1075,8 +1068,8 @@ { #[inline(always)] fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, - __param_0: ctor::RvalueReference< + self: ::std::pin::Pin<&'a mut Self>, + __param_0: ::ctor::RvalueReference< 'b, crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE, >, @@ -1087,7 +1080,7 @@ } } -#[ctor::recursively_pinned] +#[::ctor::recursively_pinned] #[repr(C)] pub struct __CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE { pub value: crate::test_namespace_bindings::TemplateParam, @@ -1097,93 +1090,93 @@ crate::__CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE ); -impl ctor::CtorNew<()> +impl ::ctor::CtorNew<()> for __CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: ()) -> Self::CtorType { let () = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { - crate::detail::__rust_thunk___ZN18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEEC1Ev__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(crate::rust_std::pin::Pin::into_inner_unchecked(dest)); + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { + crate::detail::__rust_thunk___ZN18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEEC1Ev__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(::std::pin::Pin::into_inner_unchecked(dest)); }, ) } } impl<'b> - ctor::CtorNew< + ::ctor::CtorNew< &'b crate::__CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE, > for __CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new( args:&'b crate::__CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE, ) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { - crate::detail::__rust_thunk___ZN18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEEC1ERKS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(crate::rust_std::pin::Pin::into_inner_unchecked(dest),__param_0); + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { + crate::detail::__rust_thunk___ZN18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEEC1ERKS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(::std::pin::Pin::into_inner_unchecked(dest),__param_0); }, ) } } impl<'b> - ctor::CtorNew<( + ::ctor::CtorNew<( &'b crate::__CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE, )> for __CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new( args:(&'b crate::__CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE,), ) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<&'b crate::__CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE>>::ctor_new(arg) + <Self as::ctor::CtorNew<&'b crate::__CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE>>::ctor_new(arg) } } impl<'b> - ctor::CtorNew< - ctor::RvalueReference< + ::ctor::CtorNew< + ::ctor::RvalueReference< 'b, crate::__CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE, >, > for __CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new( - args: ctor::RvalueReference< + args: ::ctor::RvalueReference< 'b, crate::__CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE, >, ) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { - crate::detail::__rust_thunk___ZN18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEEC1EOS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(crate::rust_std::pin::Pin::into_inner_unchecked(dest),__param_0); + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { + crate::detail::__rust_thunk___ZN18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEEC1EOS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(::std::pin::Pin::into_inner_unchecked(dest),__param_0); }, ) } } impl<'b> - ctor::CtorNew<( - ctor::RvalueReference< + ::ctor::CtorNew<( + ::ctor::RvalueReference< 'b, crate::__CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE, >, )> for __CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new( - args:(ctor::RvalueReference<'b,crate::__CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE>,), + args:(::ctor::RvalueReference<'b,crate::__CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE>,), ) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<ctor::RvalueReference<'b,crate::__CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE>>>::ctor_new(arg) + <Self as::ctor::CtorNew<::ctor::RvalueReference<'b,crate::__CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE>>>::ctor_new(arg) } } @@ -1194,7 +1187,7 @@ { #[inline(always)] fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, + self: ::std::pin::Pin<&'a mut Self>, __param_0:&'b crate::__CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE, ) { unsafe { @@ -1205,7 +1198,7 @@ impl<'b> ::ctor::Assign< - ctor::RvalueReference< + ::ctor::RvalueReference< 'b, crate::__CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE, >, @@ -1213,8 +1206,8 @@ { #[inline(always)] fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, - __param_0: ctor::RvalueReference< + self: ::std::pin::Pin<&'a mut Self>, + __param_0: ::ctor::RvalueReference< 'b, crate::__CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE, >, @@ -1230,65 +1223,53 @@ use super::*; extern "C" { pub(crate) fn __rust_thunk___ZN14DifferentScopeC1Ev<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::DifferentScope>, + __this: &'a mut ::std::mem::MaybeUninit<crate::DifferentScope>, ); pub(crate) fn __rust_thunk___ZN14DifferentScopeC1ERKS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::DifferentScope>, + __this: &'a mut ::std::mem::MaybeUninit<crate::DifferentScope>, __param_0: &'b crate::DifferentScope, ); pub(crate) fn __rust_thunk___ZN14DifferentScopeC1EOS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::DifferentScope>, - __param_0: ctor::RvalueReference<'b, crate::DifferentScope>, + __this: &'a mut ::std::mem::MaybeUninit<crate::DifferentScope>, + __param_0: ::ctor::RvalueReference<'b, crate::DifferentScope>, ); pub(crate) fn __rust_thunk___ZN14DifferentScopeaSERKS_<'a, 'b>( - __this: crate::rust_std::pin::Pin<&'a mut crate::DifferentScope>, + __this: ::std::pin::Pin<&'a mut crate::DifferentScope>, __param_0: &'b crate::DifferentScope, - ) -> crate::rust_std::pin::Pin<&'a mut crate::DifferentScope>; + ) -> ::std::pin::Pin<&'a mut crate::DifferentScope>; pub(crate) fn __rust_thunk___ZN14DifferentScopeaSEOS_<'a, 'b>( - __this: crate::rust_std::pin::Pin<&'a mut crate::DifferentScope>, - __param_0: ctor::RvalueReference<'b, crate::DifferentScope>, - ) -> crate::rust_std::pin::Pin<&'a mut crate::DifferentScope>; + __this: ::std::pin::Pin<&'a mut crate::DifferentScope>, + __param_0: ::ctor::RvalueReference<'b, crate::DifferentScope>, + ) -> ::std::pin::Pin<&'a mut crate::DifferentScope>; pub(crate) fn __rust_thunk___ZN23test_namespace_bindings13TemplateParamC1Ev<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit< - crate::test_namespace_bindings::TemplateParam, - >, + __this: &'a mut ::std::mem::MaybeUninit<crate::test_namespace_bindings::TemplateParam>, ); pub(crate) fn __rust_thunk___ZN23test_namespace_bindings13TemplateParamC1ERKS0_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit< - crate::test_namespace_bindings::TemplateParam, - >, + __this: &'a mut ::std::mem::MaybeUninit<crate::test_namespace_bindings::TemplateParam>, __param_0: &'b crate::test_namespace_bindings::TemplateParam, ); pub(crate) fn __rust_thunk___ZN23test_namespace_bindings13TemplateParamC1EOS0_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit< - crate::test_namespace_bindings::TemplateParam, - >, - __param_0: ctor::RvalueReference<'b, crate::test_namespace_bindings::TemplateParam>, + __this: &'a mut ::std::mem::MaybeUninit<crate::test_namespace_bindings::TemplateParam>, + __param_0: ::ctor::RvalueReference<'b, crate::test_namespace_bindings::TemplateParam>, ); pub(crate) fn __rust_thunk___ZN23test_namespace_bindings13TemplateParamaSERKS0_<'a, 'b>( - __this: crate::rust_std::pin::Pin< - &'a mut crate::test_namespace_bindings::TemplateParam, - >, + __this: ::std::pin::Pin<&'a mut crate::test_namespace_bindings::TemplateParam>, __param_0: &'b crate::test_namespace_bindings::TemplateParam, - ) -> crate::rust_std::pin::Pin<&'a mut crate::test_namespace_bindings::TemplateParam>; + ) -> ::std::pin::Pin<&'a mut crate::test_namespace_bindings::TemplateParam>; pub(crate) fn __rust_thunk___ZN23test_namespace_bindings13TemplateParamaSEOS0_<'a, 'b>( - __this: crate::rust_std::pin::Pin< - &'a mut crate::test_namespace_bindings::TemplateParam, - >, - __param_0: ctor::RvalueReference<'b, crate::test_namespace_bindings::TemplateParam>, - ) -> crate::rust_std::pin::Pin<&'a mut crate::test_namespace_bindings::TemplateParam>; + __this: ::std::pin::Pin<&'a mut crate::test_namespace_bindings::TemplateParam>, + __param_0: ::ctor::RvalueReference<'b, crate::test_namespace_bindings::TemplateParam>, + ) -> ::std::pin::Pin<&'a mut crate::test_namespace_bindings::TemplateParam>; #[link_name = "_Z36processForwardDeclaredSpecializationP18MyTopLevelTemplateIiE"] pub(crate) fn __rust_thunk___Z36processForwardDeclaredSpecializationP18MyTopLevelTemplateIiE< 'a, >( - i: Option< - crate::rust_std::pin::Pin<&'a mut crate::__CcTemplateInst18MyTopLevelTemplateIiE>, - >, + i: Option<::std::pin::Pin<&'a mut crate::__CcTemplateInst18MyTopLevelTemplateIiE>>, ); pub(crate) fn __rust_thunk___ZN23test_namespace_bindings10MyTemplateI14DifferentScopeEC1Ev__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc< 'a, >( - __this: &'a mut crate::rust_std::mem::MaybeUninit< + __this: &'a mut ::std::mem::MaybeUninit< crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE, >, ); @@ -1296,7 +1277,7 @@ 'a, 'b, >( - __this: &'a mut crate::rust_std::mem::MaybeUninit< + __this: &'a mut ::std::mem::MaybeUninit< crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE, >, __param_0:&'b crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE, @@ -1305,16 +1286,16 @@ 'a, 'b, >( - __this: &'a mut crate::rust_std::mem::MaybeUninit< + __this: &'a mut ::std::mem::MaybeUninit< crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE, >, - __param_0: ctor::RvalueReference< + __param_0: ::ctor::RvalueReference< 'b, crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE, >, ); - pub(crate)fn __rust_thunk___ZN23test_namespace_bindings10MyTemplateI14DifferentScopeEaSERKS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc<'a,'b>(__this:crate::rust_std::pin::Pin<&'a mut crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE>,__param_0:&'b crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE)->crate::rust_std::pin::Pin<&'a mut crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE>; - pub(crate)fn __rust_thunk___ZN23test_namespace_bindings10MyTemplateI14DifferentScopeEaSEOS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc<'a,'b>(__this:crate::rust_std::pin::Pin<&'a mut crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE>,__param_0:ctor::RvalueReference<'b,crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE>)->crate::rust_std::pin::Pin<&'a mut crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE>; + pub(crate)fn __rust_thunk___ZN23test_namespace_bindings10MyTemplateI14DifferentScopeEaSERKS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc<'a,'b>(__this: ::std::pin::Pin<&'a mut crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE>,__param_0:&'b crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE)->::std::pin::Pin<&'a mut crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE>; + pub(crate)fn __rust_thunk___ZN23test_namespace_bindings10MyTemplateI14DifferentScopeEaSEOS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc<'a,'b>(__this: ::std::pin::Pin<&'a mut crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE>,__param_0: ::ctor::RvalueReference<'b,crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE>)->::std::pin::Pin<&'a mut crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE>; pub(crate) fn __rust_thunk___ZN23test_namespace_bindings10MyTemplateI14DifferentScopeE6CreateES1___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc( value: crate::DifferentScope, ) -> crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE; @@ -1326,7 +1307,7 @@ pub(crate) fn __rust_thunk___ZN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEC1Ev__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc< 'a, >( - __this: &'a mut crate::rust_std::mem::MaybeUninit< + __this: &'a mut ::std::mem::MaybeUninit< crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE, >, ); @@ -1334,7 +1315,7 @@ 'a, 'b, >( - __this: &'a mut crate::rust_std::mem::MaybeUninit< + __this: &'a mut ::std::mem::MaybeUninit< crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE, >, __param_0:&'b crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE, @@ -1343,16 +1324,16 @@ 'a, 'b, >( - __this: &'a mut crate::rust_std::mem::MaybeUninit< + __this: &'a mut ::std::mem::MaybeUninit< crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE, >, - __param_0: ctor::RvalueReference< + __param_0: ::ctor::RvalueReference< 'b, crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE, >, ); - pub(crate)fn __rust_thunk___ZN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEaSERKS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc<'a,'b>(__this:crate::rust_std::pin::Pin<&'a mut crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE>,__param_0:&'b crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE)->crate::rust_std::pin::Pin<&'a mut crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE>; - pub(crate)fn __rust_thunk___ZN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEaSEOS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc<'a,'b>(__this:crate::rust_std::pin::Pin<&'a mut crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE>,__param_0:ctor::RvalueReference<'b,crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE>)->crate::rust_std::pin::Pin<&'a mut crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE>; + pub(crate)fn __rust_thunk___ZN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEaSERKS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc<'a,'b>(__this: ::std::pin::Pin<&'a mut crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE>,__param_0:&'b crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE)->::std::pin::Pin<&'a mut crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE>; + pub(crate)fn __rust_thunk___ZN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEaSEOS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc<'a,'b>(__this: ::std::pin::Pin<&'a mut crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE>,__param_0: ::ctor::RvalueReference<'b,crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE>)->::std::pin::Pin<&'a mut crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE>; pub(crate) fn __rust_thunk___ZN23test_namespace_bindings10MyTemplateINS_13TemplateParamEE6CreateES1___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc( value: crate::test_namespace_bindings::TemplateParam, ) -> crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE; @@ -1364,7 +1345,7 @@ pub(crate) fn __rust_thunk___ZN23test_namespace_bindings10MyTemplateIiEC1Ev__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc< 'a, >( - __this: &'a mut crate::rust_std::mem::MaybeUninit< + __this: &'a mut ::std::mem::MaybeUninit< crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE, >, ); @@ -1372,7 +1353,7 @@ 'a, 'b, >( - __this: &'a mut crate::rust_std::mem::MaybeUninit< + __this: &'a mut ::std::mem::MaybeUninit< crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE, >, __param_0: &'b crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE, @@ -1381,10 +1362,10 @@ 'a, 'b, >( - __this: &'a mut crate::rust_std::mem::MaybeUninit< + __this: &'a mut ::std::mem::MaybeUninit< crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE, >, - __param_0: ctor::RvalueReference< + __param_0: ::ctor::RvalueReference< 'b, crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE, >, @@ -1393,25 +1374,25 @@ 'a, 'b, >( - __this: crate::rust_std::pin::Pin< + __this: ::std::pin::Pin< &'a mut crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE, >, __param_0: &'b crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE, - ) -> crate::rust_std::pin::Pin< + ) -> ::std::pin::Pin< &'a mut crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE, >; pub(crate) fn __rust_thunk___ZN23test_namespace_bindings10MyTemplateIiEaSEOS1___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc< 'a, 'b, >( - __this: crate::rust_std::pin::Pin< + __this: ::std::pin::Pin< &'a mut crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE, >, - __param_0: ctor::RvalueReference< + __param_0: ::ctor::RvalueReference< 'b, crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE, >, - ) -> crate::rust_std::pin::Pin< + ) -> ::std::pin::Pin< &'a mut crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE, >; pub(crate) fn __rust_thunk___ZN23test_namespace_bindings10MyTemplateIiE6CreateEi__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc( @@ -1425,28 +1406,28 @@ pub(crate) fn __rust_thunk___ZN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEC1Ev__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc< 'a, >( - __this:&'a mut crate::rust_std::mem::MaybeUninit<crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE>, + __this:&'a mut::std::mem::MaybeUninit<crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE>, ); pub(crate) fn __rust_thunk___ZN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEC1ERKS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc< 'a, 'b, >( - __this:&'a mut crate::rust_std::mem::MaybeUninit<crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE>, + __this:&'a mut::std::mem::MaybeUninit<crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE>, __param_0:&'b crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE, ); pub(crate) fn __rust_thunk___ZN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEC1EOS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc< 'a, 'b, >( - __this:&'a mut crate::rust_std::mem::MaybeUninit<crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE>, - __param_0:ctor::RvalueReference<'b,crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE>, + __this:&'a mut::std::mem::MaybeUninit<crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE>, + __param_0: ::ctor::RvalueReference<'b,crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE>, ); - pub(crate)fn __rust_thunk___ZN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEaSERKS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc<'a,'b>(__this:crate::rust_std::pin::Pin<&'a mut crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE>,__param_0:&'b crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE)->crate::rust_std::pin::Pin<&'a mut crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE>; - pub(crate)fn __rust_thunk___ZN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEaSEOS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc<'a,'b>(__this:crate::rust_std::pin::Pin<&'a mut crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE>,__param_0:ctor::RvalueReference<'b,crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE>)->crate::rust_std::pin::Pin<&'a mut crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE>; + pub(crate)fn __rust_thunk___ZN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEaSERKS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc<'a,'b>(__this: ::std::pin::Pin<&'a mut crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE>,__param_0:&'b crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE)->::std::pin::Pin<&'a mut crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE>; + pub(crate)fn __rust_thunk___ZN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEaSEOS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc<'a,'b>(__this: ::std::pin::Pin<&'a mut crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE>,__param_0: ::ctor::RvalueReference<'b,crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE>)->::std::pin::Pin<&'a mut crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE>; pub(crate) fn __rust_thunk___ZN23test_namespace_bindings21TemplateWithTwoParamsIifEC1Ev__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc< 'a, >( - __this: &'a mut crate::rust_std::mem::MaybeUninit< + __this: &'a mut ::std::mem::MaybeUninit< crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE, >, ); @@ -1454,7 +1435,7 @@ 'a, 'b, >( - __this: &'a mut crate::rust_std::mem::MaybeUninit< + __this: &'a mut ::std::mem::MaybeUninit< crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE, >, __param_0:&'b crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE, @@ -1463,10 +1444,10 @@ 'a, 'b, >( - __this: &'a mut crate::rust_std::mem::MaybeUninit< + __this: &'a mut ::std::mem::MaybeUninit< crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE, >, - __param_0: ctor::RvalueReference< + __param_0: ::ctor::RvalueReference< 'b, crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE, >, @@ -1475,51 +1456,51 @@ 'a, 'b, >( - __this:crate::rust_std::pin::Pin<&'a mut crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE>, + __this: ::std::pin::Pin<&'a mut crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE>, __param_0:&'b crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE, - ) -> crate::rust_std::pin::Pin< + ) -> ::std::pin::Pin< &'a mut crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE, >; pub(crate) fn __rust_thunk___ZN23test_namespace_bindings21TemplateWithTwoParamsIifEaSEOS1___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc< 'a, 'b, >( - __this:crate::rust_std::pin::Pin<&'a mut crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE>, - __param_0: ctor::RvalueReference< + __this: ::std::pin::Pin<&'a mut crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE>, + __param_0: ::ctor::RvalueReference< 'b, crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE, >, - ) -> crate::rust_std::pin::Pin< + ) -> ::std::pin::Pin< &'a mut crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE, >; pub(crate) fn __rust_thunk___ZN18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEEC1Ev__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc< 'a, >( - __this:&'a mut crate::rust_std::mem::MaybeUninit<crate::__CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE>, + __this:&'a mut::std::mem::MaybeUninit<crate::__CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE>, ); pub(crate) fn __rust_thunk___ZN18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEEC1ERKS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc< 'a, 'b, >( - __this:&'a mut crate::rust_std::mem::MaybeUninit<crate::__CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE>, + __this:&'a mut::std::mem::MaybeUninit<crate::__CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE>, __param_0:&'b crate::__CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE, ); pub(crate) fn __rust_thunk___ZN18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEEC1EOS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc< 'a, 'b, >( - __this:&'a mut crate::rust_std::mem::MaybeUninit<crate::__CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE>, - __param_0:ctor::RvalueReference<'b,crate::__CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE>, + __this:&'a mut::std::mem::MaybeUninit<crate::__CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE>, + __param_0: ::ctor::RvalueReference<'b,crate::__CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE>, ); - pub(crate)fn __rust_thunk___ZN18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEEaSERKS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc<'a,'b>(__this:crate::rust_std::pin::Pin<&'a mut crate::__CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE>,__param_0:&'b crate::__CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE)->crate::rust_std::pin::Pin<&'a mut crate::__CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE>; - pub(crate)fn __rust_thunk___ZN18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEEaSEOS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc<'a,'b>(__this:crate::rust_std::pin::Pin<&'a mut crate::__CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE>,__param_0:ctor::RvalueReference<'b,crate::__CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE>)->crate::rust_std::pin::Pin<&'a mut crate::__CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE>; + pub(crate)fn __rust_thunk___ZN18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEEaSERKS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc<'a,'b>(__this: ::std::pin::Pin<&'a mut crate::__CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE>,__param_0:&'b crate::__CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE)->::std::pin::Pin<&'a mut crate::__CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE>; + pub(crate)fn __rust_thunk___ZN18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEEaSEOS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc<'a,'b>(__this: ::std::pin::Pin<&'a mut crate::__CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE>,__param_0: ::ctor::RvalueReference<'b,crate::__CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE>)->::std::pin::Pin<&'a mut crate::__CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE>; } } -const _: () = assert!(rust_std::mem::size_of::<Option<&i32>>() == rust_std::mem::size_of::<&i32>()); +const _: () = assert!(::std::mem::size_of::<Option<&i32>>() == ::std::mem::size_of::<&i32>()); -const _: () = assert!(rust_std::mem::size_of::<crate::DifferentScope>() == 1); -const _: () = assert!(rust_std::mem::align_of::<crate::DifferentScope>() == 1); +const _: () = assert!(::std::mem::size_of::<crate::DifferentScope>() == 1); +const _: () = assert!(::std::mem::align_of::<crate::DifferentScope>() == 1); const _: () = { static_assertions::assert_not_impl_any!(crate::DifferentScope: Copy); }; @@ -1527,10 +1508,8 @@ static_assertions::assert_not_impl_any!(crate::DifferentScope: Drop); }; -const _: () = - assert!(rust_std::mem::size_of::<crate::test_namespace_bindings::TemplateParam>() == 1); -const _: () = - assert!(rust_std::mem::align_of::<crate::test_namespace_bindings::TemplateParam>() == 1); +const _: () = assert!(::std::mem::size_of::<crate::test_namespace_bindings::TemplateParam>() == 1); +const _: () = assert!(::std::mem::align_of::<crate::test_namespace_bindings::TemplateParam>() == 1); const _: () = { static_assertions::assert_not_impl_any!(crate::test_namespace_bindings::TemplateParam: Copy); }; @@ -1539,12 +1518,12 @@ }; const _: () = assert!( - rust_std::mem::size_of::< + ::std::mem::size_of::< crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE, >() == 1 ); const _: () = assert!( - rust_std::mem::align_of::< + ::std::mem::align_of::< crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE, >() == 1 ); @@ -1566,12 +1545,12 @@ ); const _: () = assert!( - rust_std::mem::size_of::< + ::std::mem::size_of::< crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE, >() == 1 ); const _: () = assert!( - rust_std::mem::align_of::< + ::std::mem::align_of::< crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE, >() == 1 ); @@ -1593,11 +1572,10 @@ ); const _: () = assert!( - rust_std::mem::size_of::<crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE>() - == 4 + ::std::mem::size_of::<crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE>() == 4 ); const _: () = assert!( - rust_std::mem::align_of::<crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE>() + ::std::mem::align_of::<crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE>() == 4 ); const _: () = { @@ -1618,12 +1596,12 @@ ); const _: () = assert!( - rust_std::mem::size_of::< + ::std::mem::size_of::< crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE, >() == 12 ); const _: () = assert!( - rust_std::mem::align_of::< + ::std::mem::align_of::< crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE, >() == 4 ); @@ -1651,12 +1629,12 @@ ); const _: () = assert!( - rust_std::mem::size_of::< + ::std::mem::size_of::< crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE, >() == 8 ); const _: () = assert!( - rust_std::mem::align_of::< + ::std::mem::align_of::< crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE, >() == 4 ); @@ -1684,12 +1662,12 @@ ); const _: () = assert!( - rust_std::mem::size_of::< + ::std::mem::size_of::< crate::__CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE, >() == 1 ); const _: () = assert!( - rust_std::mem::align_of::< + ::std::mem::align_of::< crate::__CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE, >() == 1 );
diff --git a/rs_bindings_from_cc/test/golden/templates_source_order_rs_api.rs b/rs_bindings_from_cc/test/golden/templates_source_order_rs_api.rs index 4b4004d..1be8695 100644 --- a/rs_bindings_from_cc/test/golden/templates_source_order_rs_api.rs +++ b/rs_bindings_from_cc/test/golden/templates_source_order_rs_api.rs
@@ -11,8 +11,6 @@ #![allow(non_upper_case_globals)] #![deny(warnings)] -use ::std as rust_std; - // Part of the Crubit project, under the Apache License v2.0 with LLVM // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception @@ -21,10 +19,10 @@ // Error while generating bindings for item 'MyTemplate': // Class templates are not supported yet -#[ctor::recursively_pinned] +#[::ctor::recursively_pinned] #[repr(C)] pub struct TopLevel { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 1], + __non_field_data: [::std::mem::MaybeUninit<u8>; 1], } forward_declare::unsafe_define!(forward_declare::symbol!("TopLevel"), crate::TopLevel); @@ -61,10 +59,10 @@ pub type Alias6 = crate::__CcTemplateInst10MyTemplateIS_I8TopLevelEE; pub mod test_namespace_bindings { - #[ctor::recursively_pinned] + #[::ctor::recursively_pinned] #[repr(C)] pub struct Inner { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 1], + __non_field_data: [::std::mem::MaybeUninit<u8>; 1], } forward_declare::unsafe_define!( forward_declare::symbol!("Inner"), @@ -102,13 +100,13 @@ // THIRD_PARTY_CRUBIT_RS_BINDINGS_FROM_CC_TEST_GOLDEN_TEMPLATES_SOURCE_ORDER_H_ -#[ctor::recursively_pinned] +#[::ctor::recursively_pinned] #[repr(C)] pub struct __CcTemplateInst10MyTemplateI8TopLevelE { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 0], + __non_field_data: [::std::mem::MaybeUninit<u8>; 0], /// Reason for representing this field as a blob of bytes: /// Types of non-public C++ fields can be elided away - pub(crate) t: [crate::rust_std::mem::MaybeUninit<u8>; 1], + pub(crate) t: [::std::mem::MaybeUninit<u8>; 1], } forward_declare::unsafe_define!( forward_declare::symbol!("MyTemplate<TopLevel>"), @@ -145,13 +143,13 @@ } } -#[ctor::recursively_pinned] +#[::ctor::recursively_pinned] #[repr(C)] pub struct __CcTemplateInst10MyTemplateIN23test_namespace_bindings5InnerEE { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 0], + __non_field_data: [::std::mem::MaybeUninit<u8>; 0], /// Reason for representing this field as a blob of bytes: /// Types of non-public C++ fields can be elided away - pub(crate) t: [crate::rust_std::mem::MaybeUninit<u8>; 1], + pub(crate) t: [::std::mem::MaybeUninit<u8>; 1], } forward_declare::unsafe_define!( forward_declare::symbol!("MyTemplate<test_namespace_bindings::Inner>"), @@ -188,13 +186,13 @@ } } -#[ctor::recursively_pinned] +#[::ctor::recursively_pinned] #[repr(C)] pub struct __CcTemplateInst10MyTemplateIS_I8TopLevelEE { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 0], + __non_field_data: [::std::mem::MaybeUninit<u8>; 0], /// Reason for representing this field as a blob of bytes: /// Types of non-public C++ fields can be elided away - pub(crate) t: [crate::rust_std::mem::MaybeUninit<u8>; 1], + pub(crate) t: [::std::mem::MaybeUninit<u8>; 1], } forward_declare::unsafe_define!( forward_declare::symbol!("MyTemplate<MyTemplate<TopLevel>>"), @@ -231,13 +229,13 @@ } } -#[ctor::recursively_pinned] +#[::ctor::recursively_pinned] #[repr(C)] pub struct __CcTemplateInst10MyTemplateIS_IN23test_namespace_bindings5InnerEEE { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 0], + __non_field_data: [::std::mem::MaybeUninit<u8>; 0], /// Reason for representing this field as a blob of bytes: /// Types of non-public C++ fields can be elided away - pub(crate) t: [crate::rust_std::mem::MaybeUninit<u8>; 1], + pub(crate) t: [::std::mem::MaybeUninit<u8>; 1], } forward_declare::unsafe_define!( forward_declare::symbol!("MyTemplate<MyTemplate<test_namespace_bindings::Inner>>"), @@ -274,13 +272,13 @@ } } -#[ctor::recursively_pinned] +#[::ctor::recursively_pinned] #[repr(C)] pub struct __CcTemplateInst10MyTemplateIbE { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 0], + __non_field_data: [::std::mem::MaybeUninit<u8>; 0], /// Reason for representing this field as a blob of bytes: /// Types of non-public C++ fields can be elided away - pub(crate) t: [crate::rust_std::mem::MaybeUninit<u8>; 1], + pub(crate) t: [::std::mem::MaybeUninit<u8>; 1], } forward_declare::unsafe_define!( forward_declare::symbol!("MyTemplate<bool>"), @@ -314,13 +312,13 @@ } } -#[ctor::recursively_pinned] +#[::ctor::recursively_pinned] #[repr(C)] pub struct __CcTemplateInst10MyTemplateIcE { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 0], + __non_field_data: [::std::mem::MaybeUninit<u8>; 0], /// Reason for representing this field as a blob of bytes: /// Types of non-public C++ fields can be elided away - pub(crate) t: [crate::rust_std::mem::MaybeUninit<u8>; 1], + pub(crate) t: [::std::mem::MaybeUninit<u8>; 1], } forward_declare::unsafe_define!( forward_declare::symbol!("MyTemplate<char>"), @@ -354,13 +352,13 @@ } } -#[ctor::recursively_pinned] +#[::ctor::recursively_pinned] #[repr(C, align(8))] pub struct __CcTemplateInst10MyTemplateIdE { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 0], + __non_field_data: [::std::mem::MaybeUninit<u8>; 0], /// Reason for representing this field as a blob of bytes: /// Types of non-public C++ fields can be elided away - pub(crate) t: [crate::rust_std::mem::MaybeUninit<u8>; 8], + pub(crate) t: [::std::mem::MaybeUninit<u8>; 8], } forward_declare::unsafe_define!( forward_declare::symbol!("MyTemplate<double>"), @@ -394,13 +392,13 @@ } } -#[ctor::recursively_pinned] +#[::ctor::recursively_pinned] #[repr(C, align(4))] pub struct __CcTemplateInst10MyTemplateIfE { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 0], + __non_field_data: [::std::mem::MaybeUninit<u8>; 0], /// Reason for representing this field as a blob of bytes: /// Types of non-public C++ fields can be elided away - pub(crate) t: [crate::rust_std::mem::MaybeUninit<u8>; 4], + pub(crate) t: [::std::mem::MaybeUninit<u8>; 4], } forward_declare::unsafe_define!( forward_declare::symbol!("MyTemplate<float>"), @@ -434,13 +432,13 @@ } } -#[ctor::recursively_pinned] +#[::ctor::recursively_pinned] #[repr(C, align(4))] pub struct __CcTemplateInst10MyTemplateIiE { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 0], + __non_field_data: [::std::mem::MaybeUninit<u8>; 0], /// Reason for representing this field as a blob of bytes: /// Types of non-public C++ fields can be elided away - pub(crate) t: [crate::rust_std::mem::MaybeUninit<u8>; 4], + pub(crate) t: [::std::mem::MaybeUninit<u8>; 4], } forward_declare::unsafe_define!( forward_declare::symbol!("MyTemplate<int>"), @@ -517,10 +515,10 @@ } } -const _: () = assert!(rust_std::mem::size_of::<Option<&i32>>() == rust_std::mem::size_of::<&i32>()); +const _: () = assert!(::std::mem::size_of::<Option<&i32>>() == ::std::mem::size_of::<&i32>()); -const _: () = assert!(rust_std::mem::size_of::<crate::TopLevel>() == 1); -const _: () = assert!(rust_std::mem::align_of::<crate::TopLevel>() == 1); +const _: () = assert!(::std::mem::size_of::<crate::TopLevel>() == 1); +const _: () = assert!(::std::mem::align_of::<crate::TopLevel>() == 1); const _: () = { static_assertions::assert_not_impl_any!(crate::TopLevel: Copy); }; @@ -528,8 +526,8 @@ static_assertions::assert_not_impl_any!(crate::TopLevel: Drop); }; -const _: () = assert!(rust_std::mem::size_of::<crate::test_namespace_bindings::Inner>() == 1); -const _: () = assert!(rust_std::mem::align_of::<crate::test_namespace_bindings::Inner>() == 1); +const _: () = assert!(::std::mem::size_of::<crate::test_namespace_bindings::Inner>() == 1); +const _: () = assert!(::std::mem::align_of::<crate::test_namespace_bindings::Inner>() == 1); const _: () = { static_assertions::assert_not_impl_any!(crate::test_namespace_bindings::Inner: Copy); }; @@ -537,10 +535,9 @@ static_assertions::assert_not_impl_any!(crate::test_namespace_bindings::Inner: Drop); }; +const _: () = assert!(::std::mem::size_of::<crate::__CcTemplateInst10MyTemplateI8TopLevelE>() == 1); const _: () = - assert!(rust_std::mem::size_of::<crate::__CcTemplateInst10MyTemplateI8TopLevelE>() == 1); -const _: () = - assert!(rust_std::mem::align_of::<crate::__CcTemplateInst10MyTemplateI8TopLevelE>() == 1); + assert!(::std::mem::align_of::<crate::__CcTemplateInst10MyTemplateI8TopLevelE>() == 1); const _: () = { static_assertions::assert_not_impl_any!(crate::__CcTemplateInst10MyTemplateI8TopLevelE: Copy); }; @@ -552,11 +549,11 @@ ); const _: () = assert!( - rust_std::mem::size_of::<crate::__CcTemplateInst10MyTemplateIN23test_namespace_bindings5InnerEE>( - ) == 1 + ::std::mem::size_of::<crate::__CcTemplateInst10MyTemplateIN23test_namespace_bindings5InnerEE>() + == 1 ); const _: () = assert!( - rust_std::mem::align_of::<crate::__CcTemplateInst10MyTemplateIN23test_namespace_bindings5InnerEE>( + ::std::mem::align_of::<crate::__CcTemplateInst10MyTemplateIN23test_namespace_bindings5InnerEE>( ) == 1 ); const _: () = { @@ -577,9 +574,9 @@ ); const _: () = - assert!(rust_std::mem::size_of::<crate::__CcTemplateInst10MyTemplateIS_I8TopLevelEE>() == 1); + assert!(::std::mem::size_of::<crate::__CcTemplateInst10MyTemplateIS_I8TopLevelEE>() == 1); const _: () = - assert!(rust_std::mem::align_of::<crate::__CcTemplateInst10MyTemplateIS_I8TopLevelEE>() == 1); + assert!(::std::mem::align_of::<crate::__CcTemplateInst10MyTemplateIS_I8TopLevelEE>() == 1); const _: () = { static_assertions::assert_not_impl_any!( crate::__CcTemplateInst10MyTemplateIS_I8TopLevelEE: Copy @@ -596,12 +593,11 @@ ); const _: () = assert!( - rust_std::mem::size_of::< - crate::__CcTemplateInst10MyTemplateIS_IN23test_namespace_bindings5InnerEEE, - >() == 1 + ::std::mem::size_of::<crate::__CcTemplateInst10MyTemplateIS_IN23test_namespace_bindings5InnerEEE>( + ) == 1 ); const _: () = assert!( - rust_std::mem::align_of::< + ::std::mem::align_of::< crate::__CcTemplateInst10MyTemplateIS_IN23test_namespace_bindings5InnerEEE, >() == 1 ); @@ -622,8 +618,8 @@ ) == 0 ); -const _: () = assert!(rust_std::mem::size_of::<crate::__CcTemplateInst10MyTemplateIbE>() == 1); -const _: () = assert!(rust_std::mem::align_of::<crate::__CcTemplateInst10MyTemplateIbE>() == 1); +const _: () = assert!(::std::mem::size_of::<crate::__CcTemplateInst10MyTemplateIbE>() == 1); +const _: () = assert!(::std::mem::align_of::<crate::__CcTemplateInst10MyTemplateIbE>() == 1); const _: () = { static_assertions::assert_not_impl_any!(crate::__CcTemplateInst10MyTemplateIbE: Copy); }; @@ -633,8 +629,8 @@ const _: () = assert!(memoffset_unstable_const::offset_of!(crate::__CcTemplateInst10MyTemplateIbE, t) == 0); -const _: () = assert!(rust_std::mem::size_of::<crate::__CcTemplateInst10MyTemplateIcE>() == 1); -const _: () = assert!(rust_std::mem::align_of::<crate::__CcTemplateInst10MyTemplateIcE>() == 1); +const _: () = assert!(::std::mem::size_of::<crate::__CcTemplateInst10MyTemplateIcE>() == 1); +const _: () = assert!(::std::mem::align_of::<crate::__CcTemplateInst10MyTemplateIcE>() == 1); const _: () = { static_assertions::assert_not_impl_any!(crate::__CcTemplateInst10MyTemplateIcE: Copy); }; @@ -644,8 +640,8 @@ const _: () = assert!(memoffset_unstable_const::offset_of!(crate::__CcTemplateInst10MyTemplateIcE, t) == 0); -const _: () = assert!(rust_std::mem::size_of::<crate::__CcTemplateInst10MyTemplateIdE>() == 8); -const _: () = assert!(rust_std::mem::align_of::<crate::__CcTemplateInst10MyTemplateIdE>() == 8); +const _: () = assert!(::std::mem::size_of::<crate::__CcTemplateInst10MyTemplateIdE>() == 8); +const _: () = assert!(::std::mem::align_of::<crate::__CcTemplateInst10MyTemplateIdE>() == 8); const _: () = { static_assertions::assert_not_impl_any!(crate::__CcTemplateInst10MyTemplateIdE: Copy); }; @@ -655,8 +651,8 @@ const _: () = assert!(memoffset_unstable_const::offset_of!(crate::__CcTemplateInst10MyTemplateIdE, t) == 0); -const _: () = assert!(rust_std::mem::size_of::<crate::__CcTemplateInst10MyTemplateIfE>() == 4); -const _: () = assert!(rust_std::mem::align_of::<crate::__CcTemplateInst10MyTemplateIfE>() == 4); +const _: () = assert!(::std::mem::size_of::<crate::__CcTemplateInst10MyTemplateIfE>() == 4); +const _: () = assert!(::std::mem::align_of::<crate::__CcTemplateInst10MyTemplateIfE>() == 4); const _: () = { static_assertions::assert_not_impl_any!(crate::__CcTemplateInst10MyTemplateIfE: Copy); }; @@ -666,8 +662,8 @@ const _: () = assert!(memoffset_unstable_const::offset_of!(crate::__CcTemplateInst10MyTemplateIfE, t) == 0); -const _: () = assert!(rust_std::mem::size_of::<crate::__CcTemplateInst10MyTemplateIiE>() == 4); -const _: () = assert!(rust_std::mem::align_of::<crate::__CcTemplateInst10MyTemplateIiE>() == 4); +const _: () = assert!(::std::mem::size_of::<crate::__CcTemplateInst10MyTemplateIiE>() == 4); +const _: () = assert!(::std::mem::align_of::<crate::__CcTemplateInst10MyTemplateIiE>() == 4); const _: () = { static_assertions::assert_not_impl_any!(crate::__CcTemplateInst10MyTemplateIiE: Copy); };
diff --git a/rs_bindings_from_cc/test/golden/trivial_type_rs_api.rs b/rs_bindings_from_cc/test/golden/trivial_type_rs_api.rs index 741bab2..af14dfe 100644 --- a/rs_bindings_from_cc/test/golden/trivial_type_rs_api.rs +++ b/rs_bindings_from_cc/test/golden/trivial_type_rs_api.rs
@@ -11,8 +11,6 @@ #![allow(non_upper_case_globals)] #![deny(warnings)] -use ::std as rust_std; - // Part of the Crubit project, under the Apache License v2.0 with LLVM // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception @@ -33,7 +31,7 @@ impl Default for Trivial { #[inline(always)] fn default() -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN23test_namespace_bindings7TrivialC1Ev(&mut tmp); tmp.assume_init() @@ -41,12 +39,12 @@ } } - impl<'b> From<ctor::RvalueReference<'b, crate::test_namespace_bindings::Trivial>> for Trivial { + impl<'b> From<::ctor::RvalueReference<'b, crate::test_namespace_bindings::Trivial>> for Trivial { #[inline(always)] fn from( - __param_0: ctor::RvalueReference<'b, crate::test_namespace_bindings::Trivial>, + __param_0: ::ctor::RvalueReference<'b, crate::test_namespace_bindings::Trivial>, ) -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN23test_namespace_bindings7TrivialC1EOS0_( &mut tmp, __param_0, @@ -79,7 +77,7 @@ impl Default for TrivialWithDefaulted { #[inline(always)] fn default() -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN23test_namespace_bindings20TrivialWithDefaultedC1Ev( &mut tmp, @@ -93,17 +91,17 @@ // Error while generating bindings for item 'TrivialWithDefaulted::operator=': // operator= for Unpin types is not yet supported. - impl<'b> From<ctor::RvalueReference<'b, crate::test_namespace_bindings::TrivialWithDefaulted>> + impl<'b> From<::ctor::RvalueReference<'b, crate::test_namespace_bindings::TrivialWithDefaulted>> for TrivialWithDefaulted { #[inline(always)] fn from( - __param_0: ctor::RvalueReference< + __param_0: ::ctor::RvalueReference< 'b, crate::test_namespace_bindings::TrivialWithDefaulted, >, ) -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN23test_namespace_bindings20TrivialWithDefaultedC1EOS0_(&mut tmp,__param_0); tmp.assume_init() @@ -117,7 +115,7 @@ /// This struct is trivial, and therefore trivially relocatable etc., but still /// not safe to pass by reference as it is not final. - #[ctor::recursively_pinned] + #[::ctor::recursively_pinned] #[repr(C)] pub struct TrivialNonfinal { pub trivial_field: i32, @@ -127,85 +125,79 @@ crate::test_namespace_bindings::TrivialNonfinal ); - impl ctor::CtorNew<()> for TrivialNonfinal { - type CtorType = impl ctor::Ctor<Output = Self>; + impl ::ctor::CtorNew<()> for TrivialNonfinal { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: ()) -> Self::CtorType { let () = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin< - &mut crate::rust_std::mem::MaybeUninit<Self>, - >| { - unsafe { - crate::detail::__rust_thunk___ZN23test_namespace_bindings15TrivialNonfinalC1Ev(crate::rust_std::pin::Pin::into_inner_unchecked(dest)); - } + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { + crate::detail::__rust_thunk___ZN23test_namespace_bindings15TrivialNonfinalC1Ev( + ::std::pin::Pin::into_inner_unchecked(dest), + ); }, ) } } - impl<'b> ctor::CtorNew<&'b crate::test_namespace_bindings::TrivialNonfinal> for TrivialNonfinal { - type CtorType = impl ctor::Ctor<Output = Self>; + impl<'b> ::ctor::CtorNew<&'b crate::test_namespace_bindings::TrivialNonfinal> for TrivialNonfinal { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: &'b crate::test_namespace_bindings::TrivialNonfinal) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin< - &mut crate::rust_std::mem::MaybeUninit<Self>, - >| { - unsafe { - crate::detail::__rust_thunk___ZN23test_namespace_bindings15TrivialNonfinalC1ERKS0_(crate::rust_std::pin::Pin::into_inner_unchecked(dest),__param_0); - } + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { + crate::detail::__rust_thunk___ZN23test_namespace_bindings15TrivialNonfinalC1ERKS0_(::std::pin::Pin::into_inner_unchecked(dest),__param_0); }, ) } } - impl<'b> ctor::CtorNew<(&'b crate::test_namespace_bindings::TrivialNonfinal,)> for TrivialNonfinal { - type CtorType = impl ctor::Ctor<Output = Self>; + impl<'b> ::ctor::CtorNew<(&'b crate::test_namespace_bindings::TrivialNonfinal,)> + for TrivialNonfinal + { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new( args: (&'b crate::test_namespace_bindings::TrivialNonfinal,), ) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<&'b crate::test_namespace_bindings::TrivialNonfinal>>::ctor_new( + <Self as ::ctor::CtorNew<&'b crate::test_namespace_bindings::TrivialNonfinal>>::ctor_new( arg, ) } } impl<'b> - ctor::CtorNew<ctor::RvalueReference<'b, crate::test_namespace_bindings::TrivialNonfinal>> - for TrivialNonfinal + ::ctor::CtorNew< + ::ctor::RvalueReference<'b, crate::test_namespace_bindings::TrivialNonfinal>, + > for TrivialNonfinal { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new( - args: ctor::RvalueReference<'b, crate::test_namespace_bindings::TrivialNonfinal>, + args: ::ctor::RvalueReference<'b, crate::test_namespace_bindings::TrivialNonfinal>, ) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin< - &mut crate::rust_std::mem::MaybeUninit<Self>, - >| { - unsafe { - crate::detail::__rust_thunk___ZN23test_namespace_bindings15TrivialNonfinalC1EOS0_(crate::rust_std::pin::Pin::into_inner_unchecked(dest),__param_0); - } + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { + crate::detail::__rust_thunk___ZN23test_namespace_bindings15TrivialNonfinalC1EOS0_(::std::pin::Pin::into_inner_unchecked(dest),__param_0); }, ) } } impl<'b> - ctor::CtorNew<(ctor::RvalueReference<'b, crate::test_namespace_bindings::TrivialNonfinal>,)> - for TrivialNonfinal + ::ctor::CtorNew<( + ::ctor::RvalueReference<'b, crate::test_namespace_bindings::TrivialNonfinal>, + )> for TrivialNonfinal { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new( - args: (ctor::RvalueReference<'b, crate::test_namespace_bindings::TrivialNonfinal>,), + args: (::ctor::RvalueReference<'b, crate::test_namespace_bindings::TrivialNonfinal>,), ) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew< - ctor::RvalueReference<'b, crate::test_namespace_bindings::TrivialNonfinal>, + <Self as ::ctor::CtorNew< + ::ctor::RvalueReference<'b, crate::test_namespace_bindings::TrivialNonfinal>, >>::ctor_new(arg) } } @@ -213,7 +205,7 @@ impl<'b> ::ctor::Assign<&'b crate::test_namespace_bindings::TrivialNonfinal> for TrivialNonfinal { #[inline(always)] fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, + self: ::std::pin::Pin<&'a mut Self>, __param_0: &'b crate::test_namespace_bindings::TrivialNonfinal, ) { unsafe { @@ -225,13 +217,13 @@ } impl<'b> - ::ctor::Assign<ctor::RvalueReference<'b, crate::test_namespace_bindings::TrivialNonfinal>> + ::ctor::Assign<::ctor::RvalueReference<'b, crate::test_namespace_bindings::TrivialNonfinal>> for TrivialNonfinal { #[inline(always)] fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, - __param_0: ctor::RvalueReference<'b, crate::test_namespace_bindings::TrivialNonfinal>, + self: ::std::pin::Pin<&'a mut Self>, + __param_0: ::ctor::RvalueReference<'b, crate::test_namespace_bindings::TrivialNonfinal>, ) { unsafe { crate::detail::__rust_thunk___ZN23test_namespace_bindings15TrivialNonfinalaSEOS0_( @@ -284,7 +276,7 @@ #[inline(always)] pub fn TakesTrivialNonfinalByReference<'a>( - trivial: crate::rust_std::pin::Pin<&'a mut crate::test_namespace_bindings::TrivialNonfinal>, + trivial: ::std::pin::Pin<&'a mut crate::test_namespace_bindings::TrivialNonfinal>, ) { unsafe { crate::detail::__rust_thunk___ZN23test_namespace_bindings31TakesTrivialNonfinalByReferenceERNS_15TrivialNonfinalE(trivial) @@ -301,18 +293,14 @@ use super::*; extern "C" { pub(crate) fn __rust_thunk___ZN23test_namespace_bindings7TrivialC1Ev<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit< - crate::test_namespace_bindings::Trivial, - >, + __this: &'a mut ::std::mem::MaybeUninit<crate::test_namespace_bindings::Trivial>, ); pub(crate) fn __rust_thunk___ZN23test_namespace_bindings7TrivialC1EOS0_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit< - crate::test_namespace_bindings::Trivial, - >, - __param_0: ctor::RvalueReference<'b, crate::test_namespace_bindings::Trivial>, + __this: &'a mut ::std::mem::MaybeUninit<crate::test_namespace_bindings::Trivial>, + __param_0: ::ctor::RvalueReference<'b, crate::test_namespace_bindings::Trivial>, ); pub(crate) fn __rust_thunk___ZN23test_namespace_bindings20TrivialWithDefaultedC1Ev<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit< + __this: &'a mut ::std::mem::MaybeUninit< crate::test_namespace_bindings::TrivialWithDefaulted, >, ); @@ -320,43 +308,39 @@ 'a, 'b, >( - __this: &'a mut crate::rust_std::mem::MaybeUninit< + __this: &'a mut ::std::mem::MaybeUninit< crate::test_namespace_bindings::TrivialWithDefaulted, >, - __param_0: ctor::RvalueReference< + __param_0: ::ctor::RvalueReference< 'b, crate::test_namespace_bindings::TrivialWithDefaulted, >, ); pub(crate) fn __rust_thunk___ZN23test_namespace_bindings15TrivialNonfinalC1Ev<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit< + __this: &'a mut ::std::mem::MaybeUninit< crate::test_namespace_bindings::TrivialNonfinal, >, ); pub(crate) fn __rust_thunk___ZN23test_namespace_bindings15TrivialNonfinalC1ERKS0_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit< + __this: &'a mut ::std::mem::MaybeUninit< crate::test_namespace_bindings::TrivialNonfinal, >, __param_0: &'b crate::test_namespace_bindings::TrivialNonfinal, ); pub(crate) fn __rust_thunk___ZN23test_namespace_bindings15TrivialNonfinalC1EOS0_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit< + __this: &'a mut ::std::mem::MaybeUninit< crate::test_namespace_bindings::TrivialNonfinal, >, - __param_0: ctor::RvalueReference<'b, crate::test_namespace_bindings::TrivialNonfinal>, + __param_0: ::ctor::RvalueReference<'b, crate::test_namespace_bindings::TrivialNonfinal>, ); pub(crate) fn __rust_thunk___ZN23test_namespace_bindings15TrivialNonfinalaSERKS0_<'a, 'b>( - __this: crate::rust_std::pin::Pin< - &'a mut crate::test_namespace_bindings::TrivialNonfinal, - >, + __this: ::std::pin::Pin<&'a mut crate::test_namespace_bindings::TrivialNonfinal>, __param_0: &'b crate::test_namespace_bindings::TrivialNonfinal, - ) -> crate::rust_std::pin::Pin<&'a mut crate::test_namespace_bindings::TrivialNonfinal>; + ) -> ::std::pin::Pin<&'a mut crate::test_namespace_bindings::TrivialNonfinal>; pub(crate) fn __rust_thunk___ZN23test_namespace_bindings15TrivialNonfinalaSEOS0_<'a, 'b>( - __this: crate::rust_std::pin::Pin< - &'a mut crate::test_namespace_bindings::TrivialNonfinal, - >, - __param_0: ctor::RvalueReference<'b, crate::test_namespace_bindings::TrivialNonfinal>, - ) -> crate::rust_std::pin::Pin<&'a mut crate::test_namespace_bindings::TrivialNonfinal>; + __this: ::std::pin::Pin<&'a mut crate::test_namespace_bindings::TrivialNonfinal>, + __param_0: ::ctor::RvalueReference<'b, crate::test_namespace_bindings::TrivialNonfinal>, + ) -> ::std::pin::Pin<&'a mut crate::test_namespace_bindings::TrivialNonfinal>; #[link_name = "_ZN23test_namespace_bindings12TakesByValueENS_7TrivialE"] pub(crate) fn __rust_thunk___ZN23test_namespace_bindings12TakesByValueENS_7TrivialE( trivial: crate::test_namespace_bindings::Trivial, @@ -385,17 +369,15 @@ pub(crate) fn __rust_thunk___ZN23test_namespace_bindings31TakesTrivialNonfinalByReferenceERNS_15TrivialNonfinalE< 'a, >( - trivial: crate::rust_std::pin::Pin< - &'a mut crate::test_namespace_bindings::TrivialNonfinal, - >, + trivial: ::std::pin::Pin<&'a mut crate::test_namespace_bindings::TrivialNonfinal>, ); } } -const _: () = assert!(rust_std::mem::size_of::<Option<&i32>>() == rust_std::mem::size_of::<&i32>()); +const _: () = assert!(::std::mem::size_of::<Option<&i32>>() == ::std::mem::size_of::<&i32>()); -const _: () = assert!(rust_std::mem::size_of::<crate::test_namespace_bindings::Trivial>() == 4); -const _: () = assert!(rust_std::mem::align_of::<crate::test_namespace_bindings::Trivial>() == 4); +const _: () = assert!(::std::mem::size_of::<crate::test_namespace_bindings::Trivial>() == 4); +const _: () = assert!(::std::mem::align_of::<crate::test_namespace_bindings::Trivial>() == 4); const _: () = { static_assertions::assert_impl_all!(crate::test_namespace_bindings::Trivial: Clone); }; @@ -410,9 +392,9 @@ == 0 ); const _: () = - assert!(rust_std::mem::size_of::<crate::test_namespace_bindings::TrivialWithDefaulted>() == 4); + assert!(::std::mem::size_of::<crate::test_namespace_bindings::TrivialWithDefaulted>() == 4); const _: () = - assert!(rust_std::mem::align_of::<crate::test_namespace_bindings::TrivialWithDefaulted>() == 4); + assert!(::std::mem::align_of::<crate::test_namespace_bindings::TrivialWithDefaulted>() == 4); const _: () = { static_assertions::assert_impl_all!( crate::test_namespace_bindings::TrivialWithDefaulted: Clone @@ -433,9 +415,9 @@ ) == 0 ); const _: () = - assert!(rust_std::mem::size_of::<crate::test_namespace_bindings::TrivialNonfinal>() == 4); + assert!(::std::mem::size_of::<crate::test_namespace_bindings::TrivialNonfinal>() == 4); const _: () = - assert!(rust_std::mem::align_of::<crate::test_namespace_bindings::TrivialNonfinal>() == 4); + assert!(::std::mem::align_of::<crate::test_namespace_bindings::TrivialNonfinal>() == 4); const _: () = { static_assertions::assert_not_impl_any!(crate::test_namespace_bindings::TrivialNonfinal: Copy); };
diff --git a/rs_bindings_from_cc/test/golden/typedefs_rs_api.rs b/rs_bindings_from_cc/test/golden/typedefs_rs_api.rs index b8f57dc..8ac28ce 100644 --- a/rs_bindings_from_cc/test/golden/typedefs_rs_api.rs +++ b/rs_bindings_from_cc/test/golden/typedefs_rs_api.rs
@@ -11,96 +11,94 @@ #![allow(non_upper_case_globals)] #![deny(warnings)] -use ::std as rust_std; - // Part of the Crubit project, under the Apache License v2.0 with LLVM // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#[ctor::recursively_pinned] +#[::ctor::recursively_pinned] #[repr(C)] pub struct SomeStruct { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 1], + __non_field_data: [::std::mem::MaybeUninit<u8>; 1], } forward_declare::unsafe_define!(forward_declare::symbol!("SomeStruct"), crate::SomeStruct); -impl ctor::CtorNew<()> for SomeStruct { - type CtorType = impl ctor::Ctor<Output = Self>; +impl ::ctor::CtorNew<()> for SomeStruct { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: ()) -> Self::CtorType { let () = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN10SomeStructC1Ev( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), ); }, ) } } -impl<'b> ctor::CtorNew<&'b crate::SomeStruct> for SomeStruct { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<&'b crate::SomeStruct> for SomeStruct { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: &'b crate::SomeStruct) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN10SomeStructC1ERKS_( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), __param_0, ); }, ) } } -impl<'b> ctor::CtorNew<(&'b crate::SomeStruct,)> for SomeStruct { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<(&'b crate::SomeStruct,)> for SomeStruct { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: (&'b crate::SomeStruct,)) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<&'b crate::SomeStruct>>::ctor_new(arg) + <Self as ::ctor::CtorNew<&'b crate::SomeStruct>>::ctor_new(arg) } } -impl<'b> ctor::CtorNew<ctor::RvalueReference<'b, crate::SomeStruct>> for SomeStruct { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<::ctor::RvalueReference<'b, crate::SomeStruct>> for SomeStruct { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] - fn ctor_new(args: ctor::RvalueReference<'b, crate::SomeStruct>) -> Self::CtorType { + fn ctor_new(args: ::ctor::RvalueReference<'b, crate::SomeStruct>) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN10SomeStructC1EOS_( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), __param_0, ); }, ) } } -impl<'b> ctor::CtorNew<(ctor::RvalueReference<'b, crate::SomeStruct>,)> for SomeStruct { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<(::ctor::RvalueReference<'b, crate::SomeStruct>,)> for SomeStruct { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] - fn ctor_new(args: (ctor::RvalueReference<'b, crate::SomeStruct>,)) -> Self::CtorType { + fn ctor_new(args: (::ctor::RvalueReference<'b, crate::SomeStruct>,)) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<ctor::RvalueReference<'b, crate::SomeStruct>>>::ctor_new(arg) + <Self as ::ctor::CtorNew<::ctor::RvalueReference<'b, crate::SomeStruct>>>::ctor_new(arg) } } impl<'b> ::ctor::Assign<&'b crate::SomeStruct> for SomeStruct { #[inline(always)] - fn assign<'a>(self: crate::rust_std::pin::Pin<&'a mut Self>, __param_0: &'b crate::SomeStruct) { + fn assign<'a>(self: ::std::pin::Pin<&'a mut Self>, __param_0: &'b crate::SomeStruct) { unsafe { crate::detail::__rust_thunk___ZN10SomeStructaSERKS_(self, __param_0); } } } -impl<'b> ::ctor::Assign<ctor::RvalueReference<'b, crate::SomeStruct>> for SomeStruct { +impl<'b> ::ctor::Assign<::ctor::RvalueReference<'b, crate::SomeStruct>> for SomeStruct { #[inline(always)] fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, - __param_0: ctor::RvalueReference<'b, crate::SomeStruct>, + self: ::std::pin::Pin<&'a mut Self>, + __param_0: ::ctor::RvalueReference<'b, crate::SomeStruct>, ) { unsafe { crate::detail::__rust_thunk___ZN10SomeStructaSEOS_(self, __param_0); @@ -119,14 +117,14 @@ #[derive(Clone, Copy)] #[repr(C)] pub union SomeUnion { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 1], + __non_field_data: [::std::mem::MaybeUninit<u8>; 1], } forward_declare::unsafe_define!(forward_declare::symbol!("SomeUnion"), crate::SomeUnion); impl Default for SomeUnion { #[inline(always)] fn default() -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN9SomeUnionC1Ev(&mut tmp); tmp.assume_init() @@ -134,10 +132,10 @@ } } -impl<'b> From<ctor::RvalueReference<'b, crate::SomeUnion>> for SomeUnion { +impl<'b> From<::ctor::RvalueReference<'b, crate::SomeUnion>> for SomeUnion { #[inline(always)] - fn from(__param_0: ctor::RvalueReference<'b, crate::SomeUnion>) -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + fn from(__param_0: ::ctor::RvalueReference<'b, crate::SomeUnion>) -> Self { + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN9SomeUnionC1EOS_(&mut tmp, __param_0); tmp.assume_init() @@ -168,38 +166,38 @@ use super::*; extern "C" { pub(crate) fn __rust_thunk___ZN10SomeStructC1Ev<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::SomeStruct>, + __this: &'a mut ::std::mem::MaybeUninit<crate::SomeStruct>, ); pub(crate) fn __rust_thunk___ZN10SomeStructC1ERKS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::SomeStruct>, + __this: &'a mut ::std::mem::MaybeUninit<crate::SomeStruct>, __param_0: &'b crate::SomeStruct, ); pub(crate) fn __rust_thunk___ZN10SomeStructC1EOS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::SomeStruct>, - __param_0: ctor::RvalueReference<'b, crate::SomeStruct>, + __this: &'a mut ::std::mem::MaybeUninit<crate::SomeStruct>, + __param_0: ::ctor::RvalueReference<'b, crate::SomeStruct>, ); pub(crate) fn __rust_thunk___ZN10SomeStructaSERKS_<'a, 'b>( - __this: crate::rust_std::pin::Pin<&'a mut crate::SomeStruct>, + __this: ::std::pin::Pin<&'a mut crate::SomeStruct>, __param_0: &'b crate::SomeStruct, - ) -> crate::rust_std::pin::Pin<&'a mut crate::SomeStruct>; + ) -> ::std::pin::Pin<&'a mut crate::SomeStruct>; pub(crate) fn __rust_thunk___ZN10SomeStructaSEOS_<'a, 'b>( - __this: crate::rust_std::pin::Pin<&'a mut crate::SomeStruct>, - __param_0: ctor::RvalueReference<'b, crate::SomeStruct>, - ) -> crate::rust_std::pin::Pin<&'a mut crate::SomeStruct>; + __this: ::std::pin::Pin<&'a mut crate::SomeStruct>, + __param_0: ::ctor::RvalueReference<'b, crate::SomeStruct>, + ) -> ::std::pin::Pin<&'a mut crate::SomeStruct>; pub(crate) fn __rust_thunk___ZN9SomeUnionC1Ev<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::SomeUnion>, + __this: &'a mut ::std::mem::MaybeUninit<crate::SomeUnion>, ); pub(crate) fn __rust_thunk___ZN9SomeUnionC1EOS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::SomeUnion>, - __param_0: ctor::RvalueReference<'b, crate::SomeUnion>, + __this: &'a mut ::std::mem::MaybeUninit<crate::SomeUnion>, + __param_0: ::ctor::RvalueReference<'b, crate::SomeUnion>, ); } } -const _: () = assert!(rust_std::mem::size_of::<Option<&i32>>() == rust_std::mem::size_of::<&i32>()); +const _: () = assert!(::std::mem::size_of::<Option<&i32>>() == ::std::mem::size_of::<&i32>()); -const _: () = assert!(rust_std::mem::size_of::<crate::SomeStruct>() == 1); -const _: () = assert!(rust_std::mem::align_of::<crate::SomeStruct>() == 1); +const _: () = assert!(::std::mem::size_of::<crate::SomeStruct>() == 1); +const _: () = assert!(::std::mem::align_of::<crate::SomeStruct>() == 1); const _: () = { static_assertions::assert_not_impl_any!(crate::SomeStruct: Copy); }; @@ -207,8 +205,8 @@ static_assertions::assert_not_impl_any!(crate::SomeStruct: Drop); }; -const _: () = assert!(rust_std::mem::size_of::<crate::SomeUnion>() == 1); -const _: () = assert!(rust_std::mem::align_of::<crate::SomeUnion>() == 1); +const _: () = assert!(::std::mem::size_of::<crate::SomeUnion>() == 1); +const _: () = assert!(::std::mem::align_of::<crate::SomeUnion>() == 1); const _: () = { static_assertions::assert_impl_all!(crate::SomeUnion: Clone); };
diff --git a/rs_bindings_from_cc/test/golden/types_rs_api.rs b/rs_bindings_from_cc/test/golden/types_rs_api.rs index 721dc0c..241ea5c 100644 --- a/rs_bindings_from_cc/test/golden/types_rs_api.rs +++ b/rs_bindings_from_cc/test/golden/types_rs_api.rs
@@ -11,8 +11,6 @@ #![allow(non_upper_case_globals)] #![deny(warnings)] -use ::std as rust_std; - // Part of the Crubit project, under the Apache License v2.0 with LLVM // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception @@ -20,14 +18,14 @@ #[derive(Clone, Copy)] #[repr(C)] pub struct SomeStruct { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 1], + __non_field_data: [::std::mem::MaybeUninit<u8>; 1], } forward_declare::unsafe_define!(forward_declare::symbol!("SomeStruct"), crate::SomeStruct); impl Default for SomeStruct { #[inline(always)] fn default() -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN10SomeStructC1Ev(&mut tmp); tmp.assume_init() @@ -35,10 +33,10 @@ } } -impl<'b> From<ctor::RvalueReference<'b, crate::SomeStruct>> for SomeStruct { +impl<'b> From<::ctor::RvalueReference<'b, crate::SomeStruct>> for SomeStruct { #[inline(always)] - fn from(__param_0: ctor::RvalueReference<'b, crate::SomeStruct>) -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + fn from(__param_0: ::ctor::RvalueReference<'b, crate::SomeStruct>) -> Self { + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN10SomeStructC1EOS_(&mut tmp, __param_0); tmp.assume_init() @@ -120,10 +118,10 @@ crate::FieldTypeTestStruct ); -impl<'b> From<ctor::RvalueReference<'b, crate::FieldTypeTestStruct>> for FieldTypeTestStruct { +impl<'b> From<::ctor::RvalueReference<'b, crate::FieldTypeTestStruct>> for FieldTypeTestStruct { #[inline(always)] - fn from(__param_0: ctor::RvalueReference<'b, crate::FieldTypeTestStruct>) -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + fn from(__param_0: ::ctor::RvalueReference<'b, crate::FieldTypeTestStruct>) -> Self { + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN19FieldTypeTestStructC1EOS_(&mut tmp, __param_0); tmp.assume_init() @@ -162,24 +160,24 @@ use super::*; extern "C" { pub(crate) fn __rust_thunk___ZN10SomeStructC1Ev<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::SomeStruct>, + __this: &'a mut ::std::mem::MaybeUninit<crate::SomeStruct>, ); pub(crate) fn __rust_thunk___ZN10SomeStructC1EOS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::SomeStruct>, - __param_0: ctor::RvalueReference<'b, crate::SomeStruct>, + __this: &'a mut ::std::mem::MaybeUninit<crate::SomeStruct>, + __param_0: ::ctor::RvalueReference<'b, crate::SomeStruct>, ); pub(crate) fn __rust_thunk___ZN19FieldTypeTestStructC1EOS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::FieldTypeTestStruct>, - __param_0: ctor::RvalueReference<'b, crate::FieldTypeTestStruct>, + __this: &'a mut ::std::mem::MaybeUninit<crate::FieldTypeTestStruct>, + __param_0: ::ctor::RvalueReference<'b, crate::FieldTypeTestStruct>, ); pub(crate) fn __rust_thunk___Z21VoidReturningFunctionv(); } } -const _: () = assert!(rust_std::mem::size_of::<Option<&i32>>() == rust_std::mem::size_of::<&i32>()); +const _: () = assert!(::std::mem::size_of::<Option<&i32>>() == ::std::mem::size_of::<&i32>()); -const _: () = assert!(rust_std::mem::size_of::<crate::SomeStruct>() == 1); -const _: () = assert!(rust_std::mem::align_of::<crate::SomeStruct>() == 1); +const _: () = assert!(::std::mem::size_of::<crate::SomeStruct>() == 1); +const _: () = assert!(::std::mem::align_of::<crate::SomeStruct>() == 1); const _: () = { static_assertions::assert_impl_all!(crate::SomeStruct: Clone); }; @@ -190,8 +188,8 @@ static_assertions::assert_not_impl_any!(crate::SomeStruct: Drop); }; -const _: () = assert!(rust_std::mem::size_of::<crate::FieldTypeTestStruct>() == 288); -const _: () = assert!(rust_std::mem::align_of::<crate::FieldTypeTestStruct>() == 8); +const _: () = assert!(::std::mem::size_of::<crate::FieldTypeTestStruct>() == 288); +const _: () = assert!(::std::mem::align_of::<crate::FieldTypeTestStruct>() == 8); const _: () = { static_assertions::assert_impl_all!(crate::FieldTypeTestStruct: Clone); };
diff --git a/rs_bindings_from_cc/test/golden/unions_rs_api.rs b/rs_bindings_from_cc/test/golden/unions_rs_api.rs index a74e87e..3a486c4 100644 --- a/rs_bindings_from_cc/test/golden/unions_rs_api.rs +++ b/rs_bindings_from_cc/test/golden/unions_rs_api.rs
@@ -11,8 +11,6 @@ #![allow(non_upper_case_globals)] #![deny(warnings)] -use ::std as rust_std; - // Part of the Crubit project, under the Apache License v2.0 with LLVM // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception @@ -20,14 +18,14 @@ #[derive(Clone, Copy)] #[repr(C)] pub union EmptyUnion { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 1], + __non_field_data: [::std::mem::MaybeUninit<u8>; 1], } forward_declare::unsafe_define!(forward_declare::symbol!("EmptyUnion"), crate::EmptyUnion); impl Default for EmptyUnion { #[inline(always)] fn default() -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN10EmptyUnionC1Ev(&mut tmp); tmp.assume_init() @@ -35,10 +33,10 @@ } } -impl<'b> From<ctor::RvalueReference<'b, crate::EmptyUnion>> for EmptyUnion { +impl<'b> From<::ctor::RvalueReference<'b, crate::EmptyUnion>> for EmptyUnion { #[inline(always)] - fn from(__param_0: ctor::RvalueReference<'b, crate::EmptyUnion>) -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + fn from(__param_0: ::ctor::RvalueReference<'b, crate::EmptyUnion>) -> Self { + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN10EmptyUnionC1EOS_(&mut tmp, __param_0); tmp.assume_init() @@ -54,57 +52,57 @@ // Error while generating bindings for item 'EmptyUnion::operator=': // operator= for Unpin types is not yet supported. -#[ctor::recursively_pinned] +#[::ctor::recursively_pinned] #[repr(C)] pub struct Nontrivial { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 0], + __non_field_data: [::std::mem::MaybeUninit<u8>; 0], pub field: i32, } forward_declare::unsafe_define!(forward_declare::symbol!("Nontrivial"), crate::Nontrivial); -impl ctor::CtorNew<()> for Nontrivial { - type CtorType = impl ctor::Ctor<Output = Self>; +impl ::ctor::CtorNew<()> for Nontrivial { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: ()) -> Self::CtorType { let () = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN10NontrivialC1Ev( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), ); }, ) } } -impl<'b> ctor::CtorNew<ctor::RvalueReference<'b, crate::Nontrivial>> for Nontrivial { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<::ctor::RvalueReference<'b, crate::Nontrivial>> for Nontrivial { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] - fn ctor_new(args: ctor::RvalueReference<'b, crate::Nontrivial>) -> Self::CtorType { + fn ctor_new(args: ::ctor::RvalueReference<'b, crate::Nontrivial>) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN10NontrivialC1EOS_( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), __param_0, ); }, ) } } -impl<'b> ctor::CtorNew<(ctor::RvalueReference<'b, crate::Nontrivial>,)> for Nontrivial { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<(::ctor::RvalueReference<'b, crate::Nontrivial>,)> for Nontrivial { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] - fn ctor_new(args: (ctor::RvalueReference<'b, crate::Nontrivial>,)) -> Self::CtorType { + fn ctor_new(args: (::ctor::RvalueReference<'b, crate::Nontrivial>,)) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<ctor::RvalueReference<'b, crate::Nontrivial>>>::ctor_new(arg) + <Self as ::ctor::CtorNew<::ctor::RvalueReference<'b, crate::Nontrivial>>>::ctor_new(arg) } } -#[ctor::recursively_pinned(PinnedDrop)] +#[::ctor::recursively_pinned(PinnedDrop)] #[repr(C)] pub struct TriviallyCopyableButNontriviallyDestructible { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 1], + __non_field_data: [::std::mem::MaybeUninit<u8>; 1], } forward_declare::unsafe_define!( forward_declare::symbol!("TriviallyCopyableButNontriviallyDestructible"), @@ -116,7 +114,7 @@ { #[inline(always)] fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, + self: ::std::pin::Pin<&'a mut Self>, __param_0: &'b crate::TriviallyCopyableButNontriviallyDestructible, ) { unsafe { @@ -127,30 +125,30 @@ } } -impl<'b> ctor::CtorNew<&'b crate::TriviallyCopyableButNontriviallyDestructible> +impl<'b> ::ctor::CtorNew<&'b crate::TriviallyCopyableButNontriviallyDestructible> for TriviallyCopyableButNontriviallyDestructible { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: &'b crate::TriviallyCopyableButNontriviallyDestructible) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { - crate::detail::__rust_thunk___ZN44TriviallyCopyableButNontriviallyDestructibleC1ERKS_(crate::rust_std::pin::Pin::into_inner_unchecked(dest),__param_0); + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { + crate::detail::__rust_thunk___ZN44TriviallyCopyableButNontriviallyDestructibleC1ERKS_(::std::pin::Pin::into_inner_unchecked(dest),__param_0); }, ) } } -impl<'b> ctor::CtorNew<(&'b crate::TriviallyCopyableButNontriviallyDestructible,)> +impl<'b> ::ctor::CtorNew<(&'b crate::TriviallyCopyableButNontriviallyDestructible,)> for TriviallyCopyableButNontriviallyDestructible { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new( args: (&'b crate::TriviallyCopyableButNontriviallyDestructible,), ) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<&'b crate::TriviallyCopyableButNontriviallyDestructible>>::ctor_new( + <Self as ::ctor::CtorNew<&'b crate::TriviallyCopyableButNontriviallyDestructible>>::ctor_new( arg, ) } @@ -158,7 +156,7 @@ impl ::ctor::PinnedDrop for TriviallyCopyableButNontriviallyDestructible { #[inline(always)] - unsafe fn pinned_drop<'a>(self: crate::rust_std::pin::Pin<&'a mut Self>) { + unsafe fn pinned_drop<'a>(self: ::std::pin::Pin<&'a mut Self>) { crate::detail::__rust_thunk___ZN44TriviallyCopyableButNontriviallyDestructibleD1Ev(self) } } @@ -176,7 +174,7 @@ impl Default for NonEmptyUnion { #[inline(always)] fn default() -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN13NonEmptyUnionC1Ev(&mut tmp); tmp.assume_init() @@ -184,10 +182,10 @@ } } -impl<'b> From<ctor::RvalueReference<'b, crate::NonEmptyUnion>> for NonEmptyUnion { +impl<'b> From<::ctor::RvalueReference<'b, crate::NonEmptyUnion>> for NonEmptyUnion { #[inline(always)] - fn from(__param_0: ctor::RvalueReference<'b, crate::NonEmptyUnion>) -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + fn from(__param_0: ::ctor::RvalueReference<'b, crate::NonEmptyUnion>) -> Self { + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN13NonEmptyUnionC1EOS_(&mut tmp, __param_0); tmp.assume_init() @@ -203,11 +201,11 @@ // Error while generating bindings for item 'NonEmptyUnion::operator=': // operator= for Unpin types is not yet supported. -#[ctor::recursively_pinned] +#[::ctor::recursively_pinned] #[repr(C)] pub union NonCopyUnion { pub trivial_member: bool, - pub nontrivial_member: crate::rust_std::mem::ManuallyDrop<crate::Nontrivial>, + pub nontrivial_member: ::std::mem::ManuallyDrop<crate::Nontrivial>, } forward_declare::unsafe_define!(forward_declare::symbol!("NonCopyUnion"), crate::NonCopyUnion); @@ -215,14 +213,14 @@ pub union NonCopyUnion2 { pub trivial_member: bool, pub nontrivial_member: - crate::rust_std::mem::ManuallyDrop<crate::TriviallyCopyableButNontriviallyDestructible>, + ::std::mem::ManuallyDrop<crate::TriviallyCopyableButNontriviallyDestructible>, } forward_declare::unsafe_define!(forward_declare::symbol!("NonCopyUnion2"), crate::NonCopyUnion2); impl Clone for NonCopyUnion2 { #[inline(always)] fn clone<'b>(&'b self) -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN13NonCopyUnion2C1ERKS_(&mut tmp, self); tmp.assume_init() @@ -230,10 +228,10 @@ } } -impl<'b> From<ctor::RvalueReference<'b, crate::NonCopyUnion2>> for NonCopyUnion2 { +impl<'b> From<::ctor::RvalueReference<'b, crate::NonCopyUnion2>> for NonCopyUnion2 { #[inline(always)] - fn from(__param_0: ctor::RvalueReference<'b, crate::NonCopyUnion2>) -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + fn from(__param_0: ::ctor::RvalueReference<'b, crate::NonCopyUnion2>) -> Self { + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN13NonCopyUnion2C1EOS_(&mut tmp, __param_0); tmp.assume_init() @@ -254,7 +252,7 @@ pub union UnionWithOpaqueField { /// Reason for representing this field as a blob of bytes: /// Unsupported type 'char[42]': Unsupported clang::Type class 'ConstantArray' - pub(crate) constant_array_field_not_yet_supported: [crate::rust_std::mem::MaybeUninit<u8>; 42], + pub(crate) constant_array_field_not_yet_supported: [::std::mem::MaybeUninit<u8>; 42], } forward_declare::unsafe_define!( forward_declare::symbol!("UnionWithOpaqueField"), @@ -264,7 +262,7 @@ impl Default for UnionWithOpaqueField { #[inline(always)] fn default() -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN20UnionWithOpaqueFieldC1Ev(&mut tmp); tmp.assume_init() @@ -272,10 +270,10 @@ } } -impl<'b> From<ctor::RvalueReference<'b, crate::UnionWithOpaqueField>> for UnionWithOpaqueField { +impl<'b> From<::ctor::RvalueReference<'b, crate::UnionWithOpaqueField>> for UnionWithOpaqueField { #[inline(always)] - fn from(__param_0: ctor::RvalueReference<'b, crate::UnionWithOpaqueField>) -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + fn from(__param_0: ::ctor::RvalueReference<'b, crate::UnionWithOpaqueField>) -> Self { + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN20UnionWithOpaqueFieldC1EOS_(&mut tmp, __param_0); tmp.assume_init() @@ -298,73 +296,69 @@ use super::*; extern "C" { pub(crate) fn __rust_thunk___ZN10EmptyUnionC1Ev<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::EmptyUnion>, + __this: &'a mut ::std::mem::MaybeUninit<crate::EmptyUnion>, ); pub(crate) fn __rust_thunk___ZN10EmptyUnionC1EOS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::EmptyUnion>, - __param_0: ctor::RvalueReference<'b, crate::EmptyUnion>, + __this: &'a mut ::std::mem::MaybeUninit<crate::EmptyUnion>, + __param_0: ::ctor::RvalueReference<'b, crate::EmptyUnion>, ); #[link_name = "_ZN10NontrivialC1Ev"] pub(crate) fn __rust_thunk___ZN10NontrivialC1Ev<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::Nontrivial>, + __this: &'a mut ::std::mem::MaybeUninit<crate::Nontrivial>, ); #[link_name = "_ZN10NontrivialC1EOS_"] pub(crate) fn __rust_thunk___ZN10NontrivialC1EOS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::Nontrivial>, - __param_0: ctor::RvalueReference<'b, crate::Nontrivial>, + __this: &'a mut ::std::mem::MaybeUninit<crate::Nontrivial>, + __param_0: ::ctor::RvalueReference<'b, crate::Nontrivial>, ); pub(crate) fn __rust_thunk___ZN44TriviallyCopyableButNontriviallyDestructibleaSERKS_< 'a, 'b, >( - __this: crate::rust_std::pin::Pin< - &'a mut crate::TriviallyCopyableButNontriviallyDestructible, - >, + __this: ::std::pin::Pin<&'a mut crate::TriviallyCopyableButNontriviallyDestructible>, __param_0: &'b crate::TriviallyCopyableButNontriviallyDestructible, - ) -> crate::rust_std::pin::Pin<&'a mut crate::TriviallyCopyableButNontriviallyDestructible>; + ) -> ::std::pin::Pin<&'a mut crate::TriviallyCopyableButNontriviallyDestructible>; pub(crate) fn __rust_thunk___ZN44TriviallyCopyableButNontriviallyDestructibleC1ERKS_< 'a, 'b, >( - __this: &'a mut crate::rust_std::mem::MaybeUninit< + __this: &'a mut ::std::mem::MaybeUninit< crate::TriviallyCopyableButNontriviallyDestructible, >, __param_0: &'b crate::TriviallyCopyableButNontriviallyDestructible, ); pub(crate) fn __rust_thunk___ZN44TriviallyCopyableButNontriviallyDestructibleD1Ev<'a>( - __this: crate::rust_std::pin::Pin< - &'a mut crate::TriviallyCopyableButNontriviallyDestructible, - >, + __this: ::std::pin::Pin<&'a mut crate::TriviallyCopyableButNontriviallyDestructible>, ); pub(crate) fn __rust_thunk___ZN13NonEmptyUnionC1Ev<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::NonEmptyUnion>, + __this: &'a mut ::std::mem::MaybeUninit<crate::NonEmptyUnion>, ); pub(crate) fn __rust_thunk___ZN13NonEmptyUnionC1EOS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::NonEmptyUnion>, - __param_0: ctor::RvalueReference<'b, crate::NonEmptyUnion>, + __this: &'a mut ::std::mem::MaybeUninit<crate::NonEmptyUnion>, + __param_0: ::ctor::RvalueReference<'b, crate::NonEmptyUnion>, ); pub(crate) fn __rust_thunk___ZN13NonCopyUnion2C1ERKS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::NonCopyUnion2>, + __this: &'a mut ::std::mem::MaybeUninit<crate::NonCopyUnion2>, __param_0: &'b crate::NonCopyUnion2, ); pub(crate) fn __rust_thunk___ZN13NonCopyUnion2C1EOS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::NonCopyUnion2>, - __param_0: ctor::RvalueReference<'b, crate::NonCopyUnion2>, + __this: &'a mut ::std::mem::MaybeUninit<crate::NonCopyUnion2>, + __param_0: ::ctor::RvalueReference<'b, crate::NonCopyUnion2>, ); pub(crate) fn __rust_thunk___ZN20UnionWithOpaqueFieldC1Ev<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::UnionWithOpaqueField>, + __this: &'a mut ::std::mem::MaybeUninit<crate::UnionWithOpaqueField>, ); pub(crate) fn __rust_thunk___ZN20UnionWithOpaqueFieldC1EOS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::UnionWithOpaqueField>, - __param_0: ctor::RvalueReference<'b, crate::UnionWithOpaqueField>, + __this: &'a mut ::std::mem::MaybeUninit<crate::UnionWithOpaqueField>, + __param_0: ::ctor::RvalueReference<'b, crate::UnionWithOpaqueField>, ); } } -const _: () = assert!(rust_std::mem::size_of::<Option<&i32>>() == rust_std::mem::size_of::<&i32>()); +const _: () = assert!(::std::mem::size_of::<Option<&i32>>() == ::std::mem::size_of::<&i32>()); -const _: () = assert!(rust_std::mem::size_of::<crate::EmptyUnion>() == 1); -const _: () = assert!(rust_std::mem::align_of::<crate::EmptyUnion>() == 1); +const _: () = assert!(::std::mem::size_of::<crate::EmptyUnion>() == 1); +const _: () = assert!(::std::mem::align_of::<crate::EmptyUnion>() == 1); const _: () = { static_assertions::assert_impl_all!(crate::EmptyUnion: Clone); }; @@ -375,8 +369,8 @@ static_assertions::assert_not_impl_any!(crate::EmptyUnion: Drop); }; -const _: () = assert!(rust_std::mem::size_of::<crate::Nontrivial>() == 4); -const _: () = assert!(rust_std::mem::align_of::<crate::Nontrivial>() == 4); +const _: () = assert!(::std::mem::size_of::<crate::Nontrivial>() == 4); +const _: () = assert!(::std::mem::align_of::<crate::Nontrivial>() == 4); const _: () = { static_assertions::assert_not_impl_any!(crate::Nontrivial: Copy); }; @@ -386,9 +380,9 @@ const _: () = assert!(memoffset_unstable_const::offset_of!(crate::Nontrivial, field) == 0); const _: () = - assert!(rust_std::mem::size_of::<crate::TriviallyCopyableButNontriviallyDestructible>() == 1); + assert!(::std::mem::size_of::<crate::TriviallyCopyableButNontriviallyDestructible>() == 1); const _: () = - assert!(rust_std::mem::align_of::<crate::TriviallyCopyableButNontriviallyDestructible>() == 1); + assert!(::std::mem::align_of::<crate::TriviallyCopyableButNontriviallyDestructible>() == 1); const _: () = { static_assertions::assert_not_impl_any!( crate::TriviallyCopyableButNontriviallyDestructible: Copy @@ -398,8 +392,8 @@ static_assertions::assert_impl_all!(crate::TriviallyCopyableButNontriviallyDestructible: Drop); }; -const _: () = assert!(rust_std::mem::size_of::<crate::NonEmptyUnion>() == 8); -const _: () = assert!(rust_std::mem::align_of::<crate::NonEmptyUnion>() == 8); +const _: () = assert!(::std::mem::size_of::<crate::NonEmptyUnion>() == 8); +const _: () = assert!(::std::mem::align_of::<crate::NonEmptyUnion>() == 8); const _: () = { static_assertions::assert_impl_all!(crate::NonEmptyUnion: Clone); }; @@ -422,8 +416,8 @@ static_assertions::assert_impl_all!(i64: Copy); }; -const _: () = assert!(rust_std::mem::size_of::<crate::NonCopyUnion>() == 4); -const _: () = assert!(rust_std::mem::align_of::<crate::NonCopyUnion>() == 4); +const _: () = assert!(::std::mem::size_of::<crate::NonCopyUnion>() == 4); +const _: () = assert!(::std::mem::align_of::<crate::NonCopyUnion>() == 4); const _: () = { static_assertions::assert_not_impl_any!(crate::NonCopyUnion: Copy); }; @@ -434,8 +428,8 @@ static_assertions::assert_impl_all!(bool: Copy); }; -const _: () = assert!(rust_std::mem::size_of::<crate::NonCopyUnion2>() == 1); -const _: () = assert!(rust_std::mem::align_of::<crate::NonCopyUnion2>() == 1); +const _: () = assert!(::std::mem::size_of::<crate::NonCopyUnion2>() == 1); +const _: () = assert!(::std::mem::align_of::<crate::NonCopyUnion2>() == 1); const _: () = { static_assertions::assert_not_impl_any!(crate::NonCopyUnion2: Copy); }; @@ -446,8 +440,8 @@ static_assertions::assert_impl_all!(bool: Copy); }; -const _: () = assert!(rust_std::mem::size_of::<crate::UnionWithOpaqueField>() == 42); -const _: () = assert!(rust_std::mem::align_of::<crate::UnionWithOpaqueField>() == 1); +const _: () = assert!(::std::mem::size_of::<crate::UnionWithOpaqueField>() == 42); +const _: () = assert!(::std::mem::align_of::<crate::UnionWithOpaqueField>() == 1); const _: () = { static_assertions::assert_impl_all!(crate::UnionWithOpaqueField: Clone); };
diff --git a/rs_bindings_from_cc/test/golden/unsupported_rs_api.rs b/rs_bindings_from_cc/test/golden/unsupported_rs_api.rs index db5a759..1703c50 100644 --- a/rs_bindings_from_cc/test/golden/unsupported_rs_api.rs +++ b/rs_bindings_from_cc/test/golden/unsupported_rs_api.rs
@@ -11,8 +11,6 @@ #![allow(non_upper_case_globals)] #![deny(warnings)] -use ::std as rust_std; - // Part of the Crubit project, under the Apache License v2.0 with LLVM // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception @@ -30,7 +28,7 @@ impl Default for TrivialCustomType { #[inline(always)] fn default() -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN17TrivialCustomTypeC1Ev(&mut tmp); tmp.assume_init() @@ -38,10 +36,10 @@ } } -impl<'b> From<ctor::RvalueReference<'b, crate::TrivialCustomType>> for TrivialCustomType { +impl<'b> From<::ctor::RvalueReference<'b, crate::TrivialCustomType>> for TrivialCustomType { #[inline(always)] - fn from(__param_0: ctor::RvalueReference<'b, crate::TrivialCustomType>) -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + fn from(__param_0: ::ctor::RvalueReference<'b, crate::TrivialCustomType>) -> Self { + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN17TrivialCustomTypeC1EOS_(&mut tmp, __param_0); tmp.assume_init() @@ -61,10 +59,10 @@ // Error while generating bindings for item 'TrivialCustomType::operator||': // Bindings for this kind of operator (operator ||) are not supported -#[ctor::recursively_pinned] +#[::ctor::recursively_pinned] #[repr(C)] pub struct NontrivialCustomType { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 0], + __non_field_data: [::std::mem::MaybeUninit<u8>; 0], pub i: i32, } forward_declare::unsafe_define!( @@ -72,33 +70,33 @@ crate::NontrivialCustomType ); -impl<'b> ctor::CtorNew<ctor::RvalueReference<'b, crate::NontrivialCustomType>> +impl<'b> ::ctor::CtorNew<::ctor::RvalueReference<'b, crate::NontrivialCustomType>> for NontrivialCustomType { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] - fn ctor_new(args: ctor::RvalueReference<'b, crate::NontrivialCustomType>) -> Self::CtorType { + fn ctor_new(args: ::ctor::RvalueReference<'b, crate::NontrivialCustomType>) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN20NontrivialCustomTypeC1EOS_( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), __param_0, ); }, ) } } -impl<'b> ctor::CtorNew<(ctor::RvalueReference<'b, crate::NontrivialCustomType>,)> +impl<'b> ::ctor::CtorNew<(::ctor::RvalueReference<'b, crate::NontrivialCustomType>,)> for NontrivialCustomType { - type CtorType = impl ctor::Ctor<Output = Self>; + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] - fn ctor_new(args: (ctor::RvalueReference<'b, crate::NontrivialCustomType>,)) -> Self::CtorType { + fn ctor_new( + args: (::ctor::RvalueReference<'b, crate::NontrivialCustomType>,), + ) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<ctor::RvalueReference<'b, crate::NontrivialCustomType>>>::ctor_new( - arg, - ) + <Self as::ctor::CtorNew<::ctor::RvalueReference<'b,crate::NontrivialCustomType>>>::ctor_new(arg) } } @@ -135,7 +133,7 @@ /// /// Reason for representing this field as a blob of bytes: /// Unsupported type 'struct ContainingStruct::NestedStruct': No generated bindings found for 'NestedStruct' - pub(crate) nested_struct: [crate::rust_std::mem::MaybeUninit<u8>; 1], + pub(crate) nested_struct: [::std::mem::MaybeUninit<u8>; 1], } forward_declare::unsafe_define!( forward_declare::symbol!("ContainingStruct"), @@ -145,7 +143,7 @@ impl Default for ContainingStruct { #[inline(always)] fn default() -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN16ContainingStructC1Ev(&mut tmp); tmp.assume_init() @@ -153,10 +151,10 @@ } } -impl<'b> From<ctor::RvalueReference<'b, crate::ContainingStruct>> for ContainingStruct { +impl<'b> From<::ctor::RvalueReference<'b, crate::ContainingStruct>> for ContainingStruct { #[inline(always)] - fn from(__param_0: ctor::RvalueReference<'b, crate::ContainingStruct>) -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + fn from(__param_0: ::ctor::RvalueReference<'b, crate::ContainingStruct>) -> Self { + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN16ContainingStructC1EOS_(&mut tmp, __param_0); tmp.assume_init() @@ -183,31 +181,31 @@ use super::*; extern "C" { pub(crate) fn __rust_thunk___ZN17TrivialCustomTypeC1Ev<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::TrivialCustomType>, + __this: &'a mut ::std::mem::MaybeUninit<crate::TrivialCustomType>, ); pub(crate) fn __rust_thunk___ZN17TrivialCustomTypeC1EOS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::TrivialCustomType>, - __param_0: ctor::RvalueReference<'b, crate::TrivialCustomType>, + __this: &'a mut ::std::mem::MaybeUninit<crate::TrivialCustomType>, + __param_0: ::ctor::RvalueReference<'b, crate::TrivialCustomType>, ); #[link_name = "_ZN20NontrivialCustomTypeC1EOS_"] pub(crate) fn __rust_thunk___ZN20NontrivialCustomTypeC1EOS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::NontrivialCustomType>, - __param_0: ctor::RvalueReference<'b, crate::NontrivialCustomType>, + __this: &'a mut ::std::mem::MaybeUninit<crate::NontrivialCustomType>, + __param_0: ::ctor::RvalueReference<'b, crate::NontrivialCustomType>, ); pub(crate) fn __rust_thunk___ZN16ContainingStructC1Ev<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::ContainingStruct>, + __this: &'a mut ::std::mem::MaybeUninit<crate::ContainingStruct>, ); pub(crate) fn __rust_thunk___ZN16ContainingStructC1EOS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::ContainingStruct>, - __param_0: ctor::RvalueReference<'b, crate::ContainingStruct>, + __this: &'a mut ::std::mem::MaybeUninit<crate::ContainingStruct>, + __param_0: ::ctor::RvalueReference<'b, crate::ContainingStruct>, ); } } -const _: () = assert!(rust_std::mem::size_of::<Option<&i32>>() == rust_std::mem::size_of::<&i32>()); +const _: () = assert!(::std::mem::size_of::<Option<&i32>>() == ::std::mem::size_of::<&i32>()); -const _: () = assert!(rust_std::mem::size_of::<crate::TrivialCustomType>() == 4); -const _: () = assert!(rust_std::mem::align_of::<crate::TrivialCustomType>() == 4); +const _: () = assert!(::std::mem::size_of::<crate::TrivialCustomType>() == 4); +const _: () = assert!(::std::mem::align_of::<crate::TrivialCustomType>() == 4); const _: () = { static_assertions::assert_impl_all!(crate::TrivialCustomType: Clone); }; @@ -219,8 +217,8 @@ }; const _: () = assert!(memoffset_unstable_const::offset_of!(crate::TrivialCustomType, i) == 0); -const _: () = assert!(rust_std::mem::size_of::<crate::NontrivialCustomType>() == 4); -const _: () = assert!(rust_std::mem::align_of::<crate::NontrivialCustomType>() == 4); +const _: () = assert!(::std::mem::size_of::<crate::NontrivialCustomType>() == 4); +const _: () = assert!(::std::mem::align_of::<crate::NontrivialCustomType>() == 4); const _: () = { static_assertions::assert_not_impl_any!(crate::NontrivialCustomType: Copy); }; @@ -229,8 +227,8 @@ }; const _: () = assert!(memoffset_unstable_const::offset_of!(crate::NontrivialCustomType, i) == 0); -const _: () = assert!(rust_std::mem::size_of::<crate::ContainingStruct>() == 1); -const _: () = assert!(rust_std::mem::align_of::<crate::ContainingStruct>() == 1); +const _: () = assert!(::std::mem::size_of::<crate::ContainingStruct>() == 1); +const _: () = assert!(::std::mem::align_of::<crate::ContainingStruct>() == 1); const _: () = { static_assertions::assert_impl_all!(crate::ContainingStruct: Clone); };
diff --git a/rs_bindings_from_cc/test/golden/user_of_base_class_rs_api.rs b/rs_bindings_from_cc/test/golden/user_of_base_class_rs_api.rs index 3a1f341..c4b9316 100644 --- a/rs_bindings_from_cc/test/golden/user_of_base_class_rs_api.rs +++ b/rs_bindings_from_cc/test/golden/user_of_base_class_rs_api.rs
@@ -11,8 +11,6 @@ #![allow(non_upper_case_globals)] #![deny(warnings)] -use ::std as rust_std; - // Part of the Crubit project, under the Apache License v2.0 with LLVM // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception @@ -22,91 +20,91 @@ /// This tests inheritance across library boundaries. /// /// TODO(b/216195042): Correctly namespace base classes in generated Rust code. -#[ctor::recursively_pinned] +#[::ctor::recursively_pinned] #[repr(C, align(8))] pub struct Derived2 { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 20], + __non_field_data: [::std::mem::MaybeUninit<u8>; 20], pub derived_1: u8, } forward_declare::unsafe_define!(forward_declare::symbol!("Derived2"), crate::Derived2); -impl ctor::CtorNew<()> for Derived2 { - type CtorType = impl ctor::Ctor<Output = Self>; +impl ::ctor::CtorNew<()> for Derived2 { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: ()) -> Self::CtorType { let () = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN8Derived2C1Ev( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), ); }, ) } } -impl<'b> ctor::CtorNew<&'b crate::Derived2> for Derived2 { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<&'b crate::Derived2> for Derived2 { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: &'b crate::Derived2) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN8Derived2C1ERKS_( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), __param_0, ); }, ) } } -impl<'b> ctor::CtorNew<(&'b crate::Derived2,)> for Derived2 { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<(&'b crate::Derived2,)> for Derived2 { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: (&'b crate::Derived2,)) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<&'b crate::Derived2>>::ctor_new(arg) + <Self as ::ctor::CtorNew<&'b crate::Derived2>>::ctor_new(arg) } } -impl<'b> ctor::CtorNew<ctor::RvalueReference<'b, crate::Derived2>> for Derived2 { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<::ctor::RvalueReference<'b, crate::Derived2>> for Derived2 { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] - fn ctor_new(args: ctor::RvalueReference<'b, crate::Derived2>) -> Self::CtorType { + fn ctor_new(args: ::ctor::RvalueReference<'b, crate::Derived2>) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN8Derived2C1EOS_( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), __param_0, ); }, ) } } -impl<'b> ctor::CtorNew<(ctor::RvalueReference<'b, crate::Derived2>,)> for Derived2 { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<(::ctor::RvalueReference<'b, crate::Derived2>,)> for Derived2 { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] - fn ctor_new(args: (ctor::RvalueReference<'b, crate::Derived2>,)) -> Self::CtorType { + fn ctor_new(args: (::ctor::RvalueReference<'b, crate::Derived2>,)) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<ctor::RvalueReference<'b, crate::Derived2>>>::ctor_new(arg) + <Self as ::ctor::CtorNew<::ctor::RvalueReference<'b, crate::Derived2>>>::ctor_new(arg) } } impl<'b> ::ctor::Assign<&'b crate::Derived2> for Derived2 { #[inline(always)] - fn assign<'a>(self: crate::rust_std::pin::Pin<&'a mut Self>, __param_0: &'b crate::Derived2) { + fn assign<'a>(self: ::std::pin::Pin<&'a mut Self>, __param_0: &'b crate::Derived2) { unsafe { crate::detail::__rust_thunk___ZN8Derived2aSERKS_(self, __param_0); } } } -impl<'b> ::ctor::Assign<ctor::RvalueReference<'b, crate::Derived2>> for Derived2 { +impl<'b> ::ctor::Assign<::ctor::RvalueReference<'b, crate::Derived2>> for Derived2 { #[inline(always)] fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, - __param_0: ctor::RvalueReference<'b, crate::Derived2>, + self: ::std::pin::Pin<&'a mut Self>, + __param_0: ::ctor::RvalueReference<'b, crate::Derived2>, ) { unsafe { crate::detail::__rust_thunk___ZN8Derived2aSEOS_(self, __param_0); @@ -130,96 +128,97 @@ } } -#[ctor::recursively_pinned] +#[::ctor::recursively_pinned] #[repr(C, align(8))] pub struct VirtualDerived2 { - __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 32], + __non_field_data: [::std::mem::MaybeUninit<u8>; 32], } forward_declare::unsafe_define!( forward_declare::symbol!("VirtualDerived2"), crate::VirtualDerived2 ); -impl ctor::CtorNew<()> for VirtualDerived2 { - type CtorType = impl ctor::Ctor<Output = Self>; +impl ::ctor::CtorNew<()> for VirtualDerived2 { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: ()) -> Self::CtorType { let () = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN15VirtualDerived2C1Ev( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), ); }, ) } } -impl<'b> ctor::CtorNew<&'b crate::VirtualDerived2> for VirtualDerived2 { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<&'b crate::VirtualDerived2> for VirtualDerived2 { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: &'b crate::VirtualDerived2) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN15VirtualDerived2C1ERKS_( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), __param_0, ); }, ) } } -impl<'b> ctor::CtorNew<(&'b crate::VirtualDerived2,)> for VirtualDerived2 { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<(&'b crate::VirtualDerived2,)> for VirtualDerived2 { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] fn ctor_new(args: (&'b crate::VirtualDerived2,)) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<&'b crate::VirtualDerived2>>::ctor_new(arg) + <Self as ::ctor::CtorNew<&'b crate::VirtualDerived2>>::ctor_new(arg) } } -impl<'b> ctor::CtorNew<ctor::RvalueReference<'b, crate::VirtualDerived2>> for VirtualDerived2 { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<::ctor::RvalueReference<'b, crate::VirtualDerived2>> for VirtualDerived2 { + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] - fn ctor_new(args: ctor::RvalueReference<'b, crate::VirtualDerived2>) -> Self::CtorType { + fn ctor_new(args: ::ctor::RvalueReference<'b, crate::VirtualDerived2>) -> Self::CtorType { let __param_0 = args; - ctor::FnCtor::new( - move |dest: crate::rust_std::pin::Pin<&mut crate::rust_std::mem::MaybeUninit<Self>>| unsafe { + ::ctor::FnCtor::new( + move |dest: ::std::pin::Pin<&mut ::std::mem::MaybeUninit<Self>>| unsafe { crate::detail::__rust_thunk___ZN15VirtualDerived2C1EOS_( - crate::rust_std::pin::Pin::into_inner_unchecked(dest), + ::std::pin::Pin::into_inner_unchecked(dest), __param_0, ); }, ) } } -impl<'b> ctor::CtorNew<(ctor::RvalueReference<'b, crate::VirtualDerived2>,)> for VirtualDerived2 { - type CtorType = impl ctor::Ctor<Output = Self>; +impl<'b> ::ctor::CtorNew<(::ctor::RvalueReference<'b, crate::VirtualDerived2>,)> + for VirtualDerived2 +{ + type CtorType = impl ::ctor::Ctor<Output = Self>; #[inline(always)] - fn ctor_new(args: (ctor::RvalueReference<'b, crate::VirtualDerived2>,)) -> Self::CtorType { + fn ctor_new(args: (::ctor::RvalueReference<'b, crate::VirtualDerived2>,)) -> Self::CtorType { let (arg,) = args; - <Self as ctor::CtorNew<ctor::RvalueReference<'b, crate::VirtualDerived2>>>::ctor_new(arg) + <Self as ::ctor::CtorNew<::ctor::RvalueReference<'b, crate::VirtualDerived2>>>::ctor_new( + arg, + ) } } impl<'b> ::ctor::Assign<&'b crate::VirtualDerived2> for VirtualDerived2 { #[inline(always)] - fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, - __param_0: &'b crate::VirtualDerived2, - ) { + fn assign<'a>(self: ::std::pin::Pin<&'a mut Self>, __param_0: &'b crate::VirtualDerived2) { unsafe { crate::detail::__rust_thunk___ZN15VirtualDerived2aSERKS_(self, __param_0); } } } -impl<'b> ::ctor::Assign<ctor::RvalueReference<'b, crate::VirtualDerived2>> for VirtualDerived2 { +impl<'b> ::ctor::Assign<::ctor::RvalueReference<'b, crate::VirtualDerived2>> for VirtualDerived2 { #[inline(always)] fn assign<'a>( - self: crate::rust_std::pin::Pin<&'a mut Self>, - __param_0: ctor::RvalueReference<'b, crate::VirtualDerived2>, + self: ::std::pin::Pin<&'a mut Self>, + __param_0: ::ctor::RvalueReference<'b, crate::VirtualDerived2>, ) { unsafe { crate::detail::__rust_thunk___ZN15VirtualDerived2aSEOS_(self, __param_0); @@ -250,46 +249,46 @@ use super::*; extern "C" { pub(crate) fn __rust_thunk___ZN8Derived2C1Ev<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::Derived2>, + __this: &'a mut ::std::mem::MaybeUninit<crate::Derived2>, ); pub(crate) fn __rust_thunk___ZN8Derived2C1ERKS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::Derived2>, + __this: &'a mut ::std::mem::MaybeUninit<crate::Derived2>, __param_0: &'b crate::Derived2, ); pub(crate) fn __rust_thunk___ZN8Derived2C1EOS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::Derived2>, - __param_0: ctor::RvalueReference<'b, crate::Derived2>, + __this: &'a mut ::std::mem::MaybeUninit<crate::Derived2>, + __param_0: ::ctor::RvalueReference<'b, crate::Derived2>, ); pub(crate) fn __rust_thunk___ZN8Derived2aSERKS_<'a, 'b>( - __this: crate::rust_std::pin::Pin<&'a mut crate::Derived2>, + __this: ::std::pin::Pin<&'a mut crate::Derived2>, __param_0: &'b crate::Derived2, - ) -> crate::rust_std::pin::Pin<&'a mut crate::Derived2>; + ) -> ::std::pin::Pin<&'a mut crate::Derived2>; pub(crate) fn __rust_thunk___ZN8Derived2aSEOS_<'a, 'b>( - __this: crate::rust_std::pin::Pin<&'a mut crate::Derived2>, - __param_0: ctor::RvalueReference<'b, crate::Derived2>, - ) -> crate::rust_std::pin::Pin<&'a mut crate::Derived2>; + __this: ::std::pin::Pin<&'a mut crate::Derived2>, + __param_0: ::ctor::RvalueReference<'b, crate::Derived2>, + ) -> ::std::pin::Pin<&'a mut crate::Derived2>; pub fn __crubit_dynamic_upcast__Derived2__to__Base0( from: *const Derived2, ) -> *const inheritance_cc::Base0; pub(crate) fn __rust_thunk___ZN15VirtualDerived2C1Ev<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::VirtualDerived2>, + __this: &'a mut ::std::mem::MaybeUninit<crate::VirtualDerived2>, ); pub(crate) fn __rust_thunk___ZN15VirtualDerived2C1ERKS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::VirtualDerived2>, + __this: &'a mut ::std::mem::MaybeUninit<crate::VirtualDerived2>, __param_0: &'b crate::VirtualDerived2, ); pub(crate) fn __rust_thunk___ZN15VirtualDerived2C1EOS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::VirtualDerived2>, - __param_0: ctor::RvalueReference<'b, crate::VirtualDerived2>, + __this: &'a mut ::std::mem::MaybeUninit<crate::VirtualDerived2>, + __param_0: ::ctor::RvalueReference<'b, crate::VirtualDerived2>, ); pub(crate) fn __rust_thunk___ZN15VirtualDerived2aSERKS_<'a, 'b>( - __this: crate::rust_std::pin::Pin<&'a mut crate::VirtualDerived2>, + __this: ::std::pin::Pin<&'a mut crate::VirtualDerived2>, __param_0: &'b crate::VirtualDerived2, - ) -> crate::rust_std::pin::Pin<&'a mut crate::VirtualDerived2>; + ) -> ::std::pin::Pin<&'a mut crate::VirtualDerived2>; pub(crate) fn __rust_thunk___ZN15VirtualDerived2aSEOS_<'a, 'b>( - __this: crate::rust_std::pin::Pin<&'a mut crate::VirtualDerived2>, - __param_0: ctor::RvalueReference<'b, crate::VirtualDerived2>, - ) -> crate::rust_std::pin::Pin<&'a mut crate::VirtualDerived2>; + __this: ::std::pin::Pin<&'a mut crate::VirtualDerived2>, + __param_0: ::ctor::RvalueReference<'b, crate::VirtualDerived2>, + ) -> ::std::pin::Pin<&'a mut crate::VirtualDerived2>; pub fn __crubit_dynamic_upcast__VirtualDerived2__to__VirtualBase1( from: *const VirtualDerived2, ) -> *const inheritance_cc::VirtualBase1; @@ -302,10 +301,10 @@ } } -const _: () = assert!(rust_std::mem::size_of::<Option<&i32>>() == rust_std::mem::size_of::<&i32>()); +const _: () = assert!(::std::mem::size_of::<Option<&i32>>() == ::std::mem::size_of::<&i32>()); -const _: () = assert!(rust_std::mem::size_of::<crate::Derived2>() == 24); -const _: () = assert!(rust_std::mem::align_of::<crate::Derived2>() == 8); +const _: () = assert!(::std::mem::size_of::<crate::Derived2>() == 24); +const _: () = assert!(::std::mem::align_of::<crate::Derived2>() == 8); const _: () = { static_assertions::assert_not_impl_any!(crate::Derived2: Copy); }; @@ -314,8 +313,8 @@ }; const _: () = assert!(memoffset_unstable_const::offset_of!(crate::Derived2, derived_1) == 20); -const _: () = assert!(rust_std::mem::size_of::<crate::VirtualDerived2>() == 32); -const _: () = assert!(rust_std::mem::align_of::<crate::VirtualDerived2>() == 8); +const _: () = assert!(::std::mem::size_of::<crate::VirtualDerived2>() == 32); +const _: () = assert!(::std::mem::align_of::<crate::VirtualDerived2>() == 8); const _: () = { static_assertions::assert_not_impl_any!(crate::VirtualDerived2: Copy); };
diff --git a/rs_bindings_from_cc/test/golden/user_of_imported_type_rs_api.rs b/rs_bindings_from_cc/test/golden/user_of_imported_type_rs_api.rs index 32490b7..d99f1fe 100644 --- a/rs_bindings_from_cc/test/golden/user_of_imported_type_rs_api.rs +++ b/rs_bindings_from_cc/test/golden/user_of_imported_type_rs_api.rs
@@ -11,8 +11,6 @@ #![allow(non_upper_case_globals)] #![deny(warnings)] -use ::std as rust_std; - // Part of the Crubit project, under the Apache License v2.0 with LLVM // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception @@ -39,7 +37,7 @@ impl Default for UserOfImportedType { #[inline(always)] fn default() -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN18UserOfImportedTypeC1Ev(&mut tmp); tmp.assume_init() @@ -47,10 +45,10 @@ } } -impl<'b> From<ctor::RvalueReference<'b, crate::UserOfImportedType>> for UserOfImportedType { +impl<'b> From<::ctor::RvalueReference<'b, crate::UserOfImportedType>> for UserOfImportedType { #[inline(always)] - fn from(__param_0: ctor::RvalueReference<'b, crate::UserOfImportedType>) -> Self { - let mut tmp = crate::rust_std::mem::MaybeUninit::<Self>::zeroed(); + fn from(__param_0: ::ctor::RvalueReference<'b, crate::UserOfImportedType>) -> Self { + let mut tmp = ::std::mem::MaybeUninit::<Self>::zeroed(); unsafe { crate::detail::__rust_thunk___ZN18UserOfImportedTypeC1EOS_(&mut tmp, __param_0); tmp.assume_init() @@ -77,19 +75,19 @@ t: trivial_type_cc::test_namespace_bindings::Trivial, ) -> trivial_type_cc::test_namespace_bindings::Trivial; pub(crate) fn __rust_thunk___ZN18UserOfImportedTypeC1Ev<'a>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::UserOfImportedType>, + __this: &'a mut ::std::mem::MaybeUninit<crate::UserOfImportedType>, ); pub(crate) fn __rust_thunk___ZN18UserOfImportedTypeC1EOS_<'a, 'b>( - __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::UserOfImportedType>, - __param_0: ctor::RvalueReference<'b, crate::UserOfImportedType>, + __this: &'a mut ::std::mem::MaybeUninit<crate::UserOfImportedType>, + __param_0: ::ctor::RvalueReference<'b, crate::UserOfImportedType>, ); } } -const _: () = assert!(rust_std::mem::size_of::<Option<&i32>>() == rust_std::mem::size_of::<&i32>()); +const _: () = assert!(::std::mem::size_of::<Option<&i32>>() == ::std::mem::size_of::<&i32>()); -const _: () = assert!(rust_std::mem::size_of::<crate::UserOfImportedType>() == 8); -const _: () = assert!(rust_std::mem::align_of::<crate::UserOfImportedType>() == 8); +const _: () = assert!(::std::mem::size_of::<crate::UserOfImportedType>() == 8); +const _: () = assert!(::std::mem::align_of::<crate::UserOfImportedType>() == 8); const _: () = { static_assertions::assert_impl_all!(crate::UserOfImportedType: Clone); };
diff --git a/rs_bindings_from_cc/test/golden/user_of_unsupported_rs_api.rs b/rs_bindings_from_cc/test/golden/user_of_unsupported_rs_api.rs index d2cf3a8..68a25dc 100644 --- a/rs_bindings_from_cc/test/golden/user_of_unsupported_rs_api.rs +++ b/rs_bindings_from_cc/test/golden/user_of_unsupported_rs_api.rs
@@ -11,8 +11,6 @@ #![allow(non_upper_case_globals)] #![deny(warnings)] -use ::std as rust_std; - // Part of the Crubit project, under the Apache License v2.0 with LLVM // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception @@ -27,4 +25,4 @@ // CRUBIT_RS_BINDINGS_FROM_CC_TEST_GOLDEN_USER_OF_UNSUPPORTED_H_ -const _: () = assert!(rust_std::mem::size_of::<Option<&i32>>() == rust_std::mem::size_of::<&i32>()); +const _: () = assert!(::std::mem::size_of::<Option<&i32>>() == ::std::mem::size_of::<&i32>());