Mark implicit class template specialization record decl `Item`s as top level
Intro:
* For implicit template specialization decls, we generate top level `Item`s (even when the decl is in a namespace)
* We use the `enclosing_namespace_id` field to fully qualify types in our bindings, eg in the generated binding `pub fn processT(test_namespace_bindings::T t)`, we obtained the `test_namespace_bindings` qualifier through the `enclosing_namespace_id` field.
Problem:
Currently crubit will take an implicit template specialization decl that belongs to a namespace and will generate a (top level) `Item` that has the field `enclosing_namespace_id` set to the parent namespace's `id`. Later on when the type is spelled out (eg, when generating code for a type alias) crubit uses the provided `enclosing_namespace_id` to construct the fully qualified identifier. This is wrong, because, as mentioned above, the generated `Item` is top level.
Eg:
```
namespace ns {
template<typename T> struct MyStruct{T t;};
using Alias1 = MyStruct<int>;
}
```
gets converted to
```
pub mod ns {
// DOESN'T WORK: extra ns identifier; __CcTemplateInstN2ns8MyStructIiEE is top level
pub type Alias1 = crate::ns::__CcTemplateInstN2ns8MyStructIiEE;
}
struct __CcTemplateInstN2ns8MyStructIiEE {
pub t: i32,
}
```
The fix in this cl is simple: we know that implicit class template specialization `Item`s are top level, and as such we set their `enclosing_namespace_id` to `None`.
after this cl the generated bindings are:
```
pub mod ns {
// WORKS!!!
pub type Alias1 = crate::__CcTemplateInstN2ns8MyStructIiEE;
}
struct __CcTemplateInstN2ns8MyStructIiEE {
pub t: i32,
}
```
PiperOrigin-RevId: 456577112
diff --git a/rs_bindings_from_cc/importers/cxx_record.cc b/rs_bindings_from_cc/importers/cxx_record.cc
index 1af4926..8eccb6d 100644
--- a/rs_bindings_from_cc/importers/cxx_record.cc
+++ b/rs_bindings_from_cc/importers/cxx_record.cc
@@ -4,6 +4,7 @@
#include "rs_bindings_from_cc/importers/cxx_record.h"
+#include "absl/strings/match.h"
#include "absl/strings/substitute.h"
#include "rs_bindings_from_cc/ast_convert.h"
#include "clang/AST/ASTContext.h"
@@ -80,9 +81,12 @@
std::string rs_name, cc_name;
llvm::Optional<std::string> doc_comment;
+ bool is_implicit_class_template_specialization_decl = false;
if (auto* specialization_decl =
clang::dyn_cast<clang::ClassTemplateSpecializationDecl>(
record_decl)) {
+ is_implicit_class_template_specialization_decl =
+ !specialization_decl->isExplicitSpecialization();
rs_name = ictx_.GetMangledName(specialization_decl);
cc_name =
GetClassTemplateSpecializationCcName(ictx_.ctx_, specialization_decl);
@@ -110,7 +114,11 @@
.cc_name = std::move(cc_name),
.id = GenerateItemId(record_decl),
.owning_target = ictx_.GetOwningTarget(record_decl),
- .enclosing_namespace_id = GetEnclosingNamespaceId(record_decl)};
+ // We generate top level bindings for implicit class template
+ // specializations.
+ .enclosing_namespace_id = is_implicit_class_template_specialization_decl
+ ? llvm::None
+ : GetEnclosingNamespaceId(record_decl)};
}
// At this point we know that the import of `record_decl` will succeed /
@@ -156,7 +164,11 @@
.is_union = record_decl->isUnion(),
.is_aggregate = record_decl->isAggregate(),
.child_item_ids = std::move(item_ids),
- .enclosing_namespace_id = GetEnclosingNamespaceId(record_decl),
+ // We generate top level bindings for implicit class template
+ // specializations.
+ .enclosing_namespace_id = is_implicit_class_template_specialization_decl
+ ? llvm::None
+ : GetEnclosingNamespaceId(record_decl),
};
}
diff --git a/rs_bindings_from_cc/ir_from_cc_test.rs b/rs_bindings_from_cc/ir_from_cc_test.rs
index 061b641..3c0809c 100644
--- a/rs_bindings_from_cc/ir_from_cc_test.rs
+++ b/rs_bindings_from_cc/ir_from_cc_test.rs
@@ -871,27 +871,28 @@
fn test_typedef_of_fully_instantiated_template() -> Result<()> {
let ir = ir_from_cc(
r#" #pragma clang lifetime_elision
+ namespace test_namespace_bindings {
+ // Doc comment of MyStruct template.
+ template <typename T>
+ struct MyStruct {
+ // Doc comment of GetValue method.
+ const T& GetValue() const { return value; }
- // Doc comment of MyStruct template.
- template <typename T>
- struct MyStruct {
- // Doc comment of GetValue method.
- const T& GetValue() const { return value; }
+ // Doc comment of `value` field.
+ T value;
+ };
- // Doc comment of `value` field.
- T value;
- };
-
- // Doc comment of MyTypeAlias.
- using MyTypeAlias = MyStruct<int>; "#,
+ // Doc comment of MyTypeAlias.
+ using MyTypeAlias = MyStruct<int>;
+ }"#,
)?;
// Instantiation of the struct template:
assert_ir_matches!(
ir,
quote! {
Record {
- rs_name: "__CcTemplateInst8MyStructIiE", ...
- cc_name: "MyStruct<int>", ...
+ rs_name: "__CcTemplateInstN23test_namespace_bindings8MyStructIiEE", ...
+ cc_name: "test_namespace_bindings::MyStruct<int>", ...
owning_target: BazelLabel("//test:testing_target"), ...
doc_comment: Some("Doc comment of MyStruct template."), ...
fields: [Field {
@@ -904,10 +905,11 @@
access: Public,
offset: 0, ...
}], ...
+ enclosing_namespace_id: None, ...
}
}
);
- let record_id = retrieve_record(&ir, "MyStruct<int>").id;
+ let record_id = retrieve_record(&ir, "test_namespace_bindings::MyStruct<int>").id;
// Make sure the instantiation of the class template appears exactly once in the
// `top_level_item_ids`.
assert_eq!(1, ir.top_level_item_ids().filter(|&&id| id == record_id).count());
@@ -943,7 +945,7 @@
Func {
name: "GetValue",
owning_target: BazelLabel("//test:testing_target"),
- mangled_name: "_ZNK8MyStructIiE8GetValueEv__2f_2ftest_3atesting_5ftarget", ...
+ mangled_name: "_ZNK23test_namespace_bindings8MyStructIiE8GetValueEv__2f_2ftest_3atesting_5ftarget", ...
doc_comment: Some("Doc comment of GetValue method."), ...
is_inline: true, ...
member_func_metadata: Some(MemberFuncMetadata {
@@ -963,7 +965,7 @@
Func {
name: "operator=",
owning_target: BazelLabel("//test:testing_target"),
- mangled_name: "_ZN8MyStructIiEaSERKS0___2f_2ftest_3atesting_5ftarget", ...
+ mangled_name: "_ZN23test_namespace_bindings8MyStructIiEaSERKS1___2f_2ftest_3atesting_5ftarget", ...
doc_comment: None, ...
}
}
@@ -975,30 +977,31 @@
fn test_typedef_for_explicit_template_specialization() -> Result<()> {
let ir = ir_from_cc(
r#" #pragma clang lifetime_elision
+ namespace test_namespace_bindings {
+ template <typename T>
+ struct MyStruct final {};
- template <typename T>
- struct MyStruct final {};
+ // Doc comment for template specialization for T=int.
+ template<>
+ struct MyStruct<int> final {
+ // Doc comment of the GetValue method specialization for T=int.
+ const int& GetValue() const { return value * 42; }
- // Doc comment for template specialization for T=int.
- template<>
- struct MyStruct<int> final {
- // Doc comment of the GetValue method specialization for T=int.
- const int& GetValue() const { return value * 42; }
+ // Doc comment of the `value` field specialization for T=int.
+ int value;
+ };
- // Doc comment of the `value` field specialization for T=int.
- int value;
- };
-
- // Doc comment of MyTypeAlias.
- using MyTypeAlias = MyStruct<int>; "#,
+ // Doc comment of MyTypeAlias.
+ using MyTypeAlias = MyStruct<int>;
+ }"#,
)?;
// Instantiation of the struct template based on the specialization for T=int:
assert_ir_matches!(
ir,
quote! {
Record {
- rs_name: "__CcTemplateInst8MyStructIiE", ...
- cc_name: "MyStruct<int>", ...
+ rs_name: "__CcTemplateInstN23test_namespace_bindings8MyStructIiEE", ...
+ cc_name: "test_namespace_bindings::MyStruct<int>", ...
owning_target: BazelLabel("//test:testing_target"), ...
doc_comment: Some("Doc comment for template specialization for T=int."), ...
fields: [Field {
@@ -1011,13 +1014,18 @@
access: Public,
offset: 0, ...
}], ...
+ enclosing_namespace_id: Some(...), ...
}
}
);
- let record_id = retrieve_record(&ir, "MyStruct<int>").id;
+ let record_id = retrieve_record(&ir, "test_namespace_bindings::MyStruct<int>").id;
+
+ // TODO(b/200067826) This assertion worked because the template specialization was top level
+ // already.
// Make sure the explicit specialization of the struct template appears exactly
// once in the `top_level_item_ids`.
- assert_eq!(1, ir.top_level_item_ids().filter(|&&id| id == record_id).count());
+ // assert_eq!(1, ir.top_level_item_ids().filter(|&&id| id == record_id).count());
+
// Instance method inside the struct template:
assert_ir_matches!(
ir,
@@ -1025,7 +1033,7 @@
Func {
name: "GetValue",
owning_target: BazelLabel("//test:testing_target"),
- mangled_name: "_ZNK8MyStructIiE8GetValueEv__2f_2ftest_3atesting_5ftarget", ...
+ mangled_name: "_ZNK23test_namespace_bindings8MyStructIiE8GetValueEv__2f_2ftest_3atesting_5ftarget", ...
doc_comment: Some("Doc comment of the GetValue method specialization for T=int."), ...
is_inline: true, ...
member_func_metadata: Some(MemberFuncMetadata {
diff --git a/rs_bindings_from_cc/src_code_gen.rs b/rs_bindings_from_cc/src_code_gen.rs
index 296dff5..7cda76d 100644
--- a/rs_bindings_from_cc/src_code_gen.rs
+++ b/rs_bindings_from_cc/src_code_gen.rs
@@ -6072,4 +6072,38 @@
);
Ok(())
}
+
+ #[test]
+ fn test_implicit_template_specialization_namespace_qualifier() -> Result<()> {
+ let rs_api = generate_bindings_tokens(&ir_from_cc(
+ r#" #pragma clang lifetime_elision
+ namespace test_namespace_bindings {
+ template <typename T>
+ struct MyTemplate final {
+ T value_;
+ };
+
+ using MyTypeAlias = MyTemplate<int>;
+ }"#,
+ )?)?
+ .rs_api;
+
+ assert_rs_matches!(
+ rs_api,
+ quote! {
+ ...
+ pub mod test_namespace_bindings {
+ ...
+ pub type MyTypeAlias = crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE;
+ ...
+ }
+ ...
+ pub struct __CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE {
+ pub value_: i32,
+ }
+ ...
+ }
+ );
+ Ok(())
+ }
}
diff --git a/rs_bindings_from_cc/test/golden/templates.h b/rs_bindings_from_cc/test/golden/templates.h
index 9fee688..e3eb416 100644
--- a/rs_bindings_from_cc/test/golden/templates.h
+++ b/rs_bindings_from_cc/test/golden/templates.h
@@ -7,6 +7,10 @@
#pragma clang lifetime_elision
+struct DifferentScope {};
+
+namespace test_namespace_bindings {
+
template <typename T>
class MyTemplate {
public:
@@ -25,6 +29,10 @@
using MyTypeAlias = MyTemplate<int>;
using OtherTypeAliasInSameTarget = MyTemplate<int>;
+struct TemplateParam {};
+using TemplateWithStructTemplateParam = MyTemplate<TemplateParam>;
+using ParamFromDifferentScope = MyTemplate<DifferentScope>;
+
template <typename T1, typename T2>
struct TemplateWithTwoParams {
T1 value1;
@@ -33,4 +41,17 @@
using AliasToTemplateWithTwoParams = TemplateWithTwoParams<int, float>;
+using AliasToTemplateOfATemplate =
+ TemplateWithTwoParams<TemplateWithTwoParams<int, int>, int>;
+
+} // namespace test_namespace_bindings
+
+template <typename T>
+struct MyTopLevelTemplate {
+ T value;
+};
+
+using TopLevelTemplateWithNonTopLevelParam =
+ MyTopLevelTemplate<test_namespace_bindings::TemplateParam>;
+
#endif // THIRD_PARTY_CRUBIT_RS_BINDINGS_FROM_CC_TEST_GOLDEN_TEMPLATES_H_
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 fff2887..6a5068d 100644
--- a/rs_bindings_from_cc/test/golden/templates_rs_api.rs
+++ b/rs_bindings_from_cc/test/golden/templates_rs_api.rs
@@ -17,257 +17,1199 @@
// Exceptions. See /LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-// rs_bindings_from_cc/test/golden/templates.h;l=10
-// Error while generating bindings for item 'MyTemplate':
-// Class templates are not supported yet
-
-pub type MyTypeAlias = crate::__CcTemplateInst10MyTemplateIiE;
-
-pub type OtherTypeAliasInSameTarget = crate::__CcTemplateInst10MyTemplateIiE;
-
-// rs_bindings_from_cc/test/golden/templates.h;l=28
-// Error while generating bindings for item 'TemplateWithTwoParams':
-// Class templates are not supported yet
-
-pub type AliasToTemplateWithTwoParams = crate::__CcTemplateInst21TemplateWithTwoParamsIifE;
-
-// THIRD_PARTY_CRUBIT_RS_BINDINGS_FROM_CC_TEST_GOLDEN_TEMPLATES_H_
-
#[ctor::recursively_pinned]
-#[repr(C, align(4))]
-pub struct __CcTemplateInst10MyTemplateIiE {
- __non_field_data: [crate::rust_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],
+#[repr(C)]
+pub struct DifferentScope {
+ __non_field_data: [crate::rust_std::mem::MaybeUninit<u8>; 1],
}
-forward_declare::unsafe_define!(
- forward_declare::symbol!("MyTemplate<int>"),
- crate::__CcTemplateInst10MyTemplateIiE
-);
+forward_declare::unsafe_define!(forward_declare::symbol!("DifferentScope"), crate::DifferentScope);
-impl ctor::CtorNew<()> for __CcTemplateInst10MyTemplateIiE {
+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 {
- crate::detail::__rust_thunk___ZN10MyTemplateIiEC1Ev__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(crate::rust_std::pin::Pin::into_inner_unchecked(dest));
+ crate::detail::__rust_thunk___ZN14DifferentScopeC1Ev(
+ crate::rust_std::pin::Pin::into_inner_unchecked(dest),
+ );
},
)
}
}
-impl<'b> ctor::CtorNew<&'b crate::__CcTemplateInst10MyTemplateIiE>
- for __CcTemplateInst10MyTemplateIiE
-{
+impl<'b> ctor::CtorNew<&'b crate::DifferentScope> for DifferentScope {
type CtorType = impl ctor::Ctor<Output = Self>;
#[inline(always)]
- fn ctor_new(args: &'b crate::__CcTemplateInst10MyTemplateIiE) -> Self::CtorType {
+ 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 {
- crate::detail::__rust_thunk___ZN10MyTemplateIiEC1ERKS0___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(crate::rust_std::pin::Pin::into_inner_unchecked(dest),__param_0);
+ crate::detail::__rust_thunk___ZN14DifferentScopeC1ERKS_(
+ crate::rust_std::pin::Pin::into_inner_unchecked(dest),
+ __param_0,
+ );
},
)
}
}
-impl<'b> ctor::CtorNew<(&'b crate::__CcTemplateInst10MyTemplateIiE,)>
- for __CcTemplateInst10MyTemplateIiE
-{
+impl<'b> ctor::CtorNew<(&'b crate::DifferentScope,)> for DifferentScope {
type CtorType = impl ctor::Ctor<Output = Self>;
#[inline(always)]
- fn ctor_new(args: (&'b crate::__CcTemplateInst10MyTemplateIiE,)) -> Self::CtorType {
+ fn ctor_new(args: (&'b crate::DifferentScope,)) -> Self::CtorType {
let (arg,) = args;
- <Self as ctor::CtorNew<&'b crate::__CcTemplateInst10MyTemplateIiE>>::ctor_new(arg)
+ <Self as ctor::CtorNew<&'b crate::DifferentScope>>::ctor_new(arg)
}
}
-impl<'b> ctor::CtorNew<ctor::RvalueReference<'b, crate::__CcTemplateInst10MyTemplateIiE>>
- for __CcTemplateInst10MyTemplateIiE
+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 {
+ 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___ZN14DifferentScopeC1EOS_(
+ crate::rust_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>;
+ #[inline(always)]
+ 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)
+ }
+}
+
+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,
+ ) {
+ unsafe {
+ crate::detail::__rust_thunk___ZN14DifferentScopeaSERKS_(self, __param_0);
+ }
+ }
+}
+
+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>,
+ ) {
+ unsafe {
+ crate::detail::__rust_thunk___ZN14DifferentScopeaSEOS_(self, __param_0);
+ }
+ }
+}
+
+pub mod test_namespace_bindings {
+ // rs_bindings_from_cc/test/golden/templates.h;l=14
+ // Error while generating bindings for item 'test_namespace_bindings::MyTemplate':
+ // Class templates are not supported yet
+
+ pub type MyTypeAlias = crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE;
+
+ pub type OtherTypeAliasInSameTarget =
+ crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE;
+
+ #[ctor::recursively_pinned]
+ #[repr(C)]
+ pub struct TemplateParam {
+ __non_field_data: [crate::rust_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>;
+ #[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));
+ }
+ },
+ )
+ }
+ }
+
+ 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);
+ }
+ },
+ )
+ }
+ }
+ 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(
+ arg,
+ )
+ }
+ }
+
+ impl<'b> ctor::CtorNew<ctor::RvalueReference<'b, crate::test_namespace_bindings::TemplateParam>>
+ for TemplateParam
+ {
+ type CtorType = impl ctor::Ctor<Output = Self>;
+ #[inline(always)]
+ fn ctor_new(
+ 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);
+ }
+ },
+ )
+ }
+ }
+ impl<'b>
+ ctor::CtorNew<(ctor::RvalueReference<'b, crate::test_namespace_bindings::TemplateParam>,)>
+ for TemplateParam
+ {
+ type CtorType = impl ctor::Ctor<Output = Self>;
+ #[inline(always)]
+ fn ctor_new(
+ 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>,
+ >>::ctor_new(arg)
+ }
+ }
+
+ 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>,
+ __param_0: &'b crate::test_namespace_bindings::TemplateParam,
+ ) {
+ unsafe {
+ crate::detail::__rust_thunk___ZN23test_namespace_bindings13TemplateParamaSERKS0_(
+ self, __param_0,
+ );
+ }
+ }
+ }
+
+ impl<'b>
+ ::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>,
+ ) {
+ unsafe {
+ crate::detail::__rust_thunk___ZN23test_namespace_bindings13TemplateParamaSEOS0_(
+ self, __param_0,
+ );
+ }
+ }
+ }
+
+ pub type TemplateWithStructTemplateParam =
+ crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE;
+
+ pub type ParamFromDifferentScope =
+ crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE;
+
+ // rs_bindings_from_cc/test/golden/templates.h;l=36
+ // Error while generating bindings for item 'test_namespace_bindings::TemplateWithTwoParams':
+ // Class templates are not supported yet
+
+ pub type AliasToTemplateWithTwoParams =
+ crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE;
+
+ pub type AliasToTemplateOfATemplate =
+ crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE;
+}
+
+// namespace test_namespace_bindings
+
+// rs_bindings_from_cc/test/golden/templates.h;l=49
+// Error while generating bindings for item 'MyTopLevelTemplate':
+// Class templates are not supported yet
+
+pub type TopLevelTemplateWithNonTopLevelParam =
+ crate::__CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE;
+
+// THIRD_PARTY_CRUBIT_RS_BINDINGS_FROM_CC_TEST_GOLDEN_TEMPLATES_H_
+
+#[ctor::recursively_pinned]
+#[repr(C)]
+pub struct __CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE {
+ __non_field_data: [crate::rust_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],
+}
+forward_declare::unsafe_define!(
+ forward_declare::symbol!("test_namespace_bindings::MyTemplate<DifferentScope>"),
+ crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE
+);
+
+impl ctor::CtorNew<()>
+ for __CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE
+{
+ 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));
+ },
+ )
+ }
+}
+
+impl<'b>
+ ctor::CtorNew<
+ &'b crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE,
+ > for __CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE
{
type CtorType = impl ctor::Ctor<Output = Self>;
#[inline(always)]
fn ctor_new(
- args: ctor::RvalueReference<'b, crate::__CcTemplateInst10MyTemplateIiE>,
+ 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___ZN10MyTemplateIiEC1EOS0___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(crate::rust_std::pin::Pin::into_inner_unchecked(dest),__param_0);
+ 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);
},
)
}
}
-impl<'b> ctor::CtorNew<(ctor::RvalueReference<'b, crate::__CcTemplateInst10MyTemplateIiE>,)>
- for __CcTemplateInst10MyTemplateIiE
+impl<'b>
+ ctor::CtorNew<(
+ &'b crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE,
+ )> for __CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE
{
type CtorType = impl ctor::Ctor<Output = Self>;
#[inline(always)]
fn ctor_new(
- args: (ctor::RvalueReference<'b, crate::__CcTemplateInst10MyTemplateIiE>,),
+ args: (
+ &'b crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE,
+ ),
) -> Self::CtorType {
let (arg,) = args;
- <Self as ctor::CtorNew<ctor::RvalueReference<'b,crate::__CcTemplateInst10MyTemplateIiE>>>::ctor_new(arg)
+ <Self as ctor::CtorNew<
+ &'b crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE,
+ >>::ctor_new(arg)
}
}
-impl<'b> ::ctor::Assign<&'b crate::__CcTemplateInst10MyTemplateIiE>
- for __CcTemplateInst10MyTemplateIiE
+impl<'b>
+ ctor::CtorNew<
+ ctor::RvalueReference<
+ 'b,
+ crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE,
+ >,
+ > for __CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE
+{
+ type CtorType = impl ctor::Ctor<Output = Self>;
+ #[inline(always)]
+ fn ctor_new(
+ 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);
+ },
+ )
+ }
+}
+impl<'b>
+ ctor::CtorNew<(
+ ctor::RvalueReference<
+ 'b,
+ crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE,
+ >,
+ )> for __CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE
+{
+ type CtorType = impl ctor::Ctor<Output = Self>;
+ #[inline(always)]
+ fn ctor_new(
+ args: (
+ ctor::RvalueReference<
+ 'b,
+ crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE,
+ >,
+ ),
+ ) -> Self::CtorType {
+ let (arg,) = args;
+ <Self as ctor::CtorNew<
+ ctor::RvalueReference<
+ 'b,
+ crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE,
+ >,
+ >>::ctor_new(arg)
+ }
+}
+
+impl<'b>
+ ::ctor::Assign<
+ &'b crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE,
+ > for __CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE
{
#[inline(always)]
fn assign<'a>(
self: crate::rust_std::pin::Pin<&'a mut Self>,
- __param_0: &'b crate::__CcTemplateInst10MyTemplateIiE,
+ __param_0:&'b crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE,
) {
unsafe {
- crate::detail::__rust_thunk___ZN10MyTemplateIiEaSERKS0___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(self,__param_0);
+ crate::detail::__rust_thunk___ZN23test_namespace_bindings10MyTemplateI14DifferentScopeEaSERKS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(self,__param_0);
}
}
}
-impl<'b> ::ctor::Assign<ctor::RvalueReference<'b, crate::__CcTemplateInst10MyTemplateIiE>>
- for __CcTemplateInst10MyTemplateIiE
+impl<'b>
+ ::ctor::Assign<
+ ctor::RvalueReference<
+ 'b,
+ crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE,
+ >,
+ > for __CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE
{
#[inline(always)]
fn assign<'a>(
self: crate::rust_std::pin::Pin<&'a mut Self>,
- __param_0: ctor::RvalueReference<'b, crate::__CcTemplateInst10MyTemplateIiE>,
+ __param_0: ctor::RvalueReference<
+ 'b,
+ crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE,
+ >,
) {
unsafe {
- crate::detail::__rust_thunk___ZN10MyTemplateIiEaSEOS0___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(self,__param_0);
+ crate::detail::__rust_thunk___ZN23test_namespace_bindings10MyTemplateI14DifferentScopeEaSEOS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(self,__param_0);
}
}
}
-impl __CcTemplateInst10MyTemplateIiE {
+impl __CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE {
#[inline(always)]
- pub fn Create(value: i32) -> crate::__CcTemplateInst10MyTemplateIiE {
+ pub fn Create(
+ value: crate::DifferentScope,
+ ) -> crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE {
unsafe {
- crate::detail::__rust_thunk___ZN10MyTemplateIiE6CreateEi__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(value)
+ crate::detail::__rust_thunk___ZN23test_namespace_bindings10MyTemplateI14DifferentScopeE6CreateES1___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(value)
}
}
}
-impl __CcTemplateInst10MyTemplateIiE {
+impl __CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE {
#[inline(always)]
- pub fn value<'a>(&'a self) -> &'a i32 {
+ pub fn value<'a>(&'a self) -> &'a crate::DifferentScope {
unsafe {
- crate::detail::__rust_thunk___ZNK10MyTemplateIiE5valueEv__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(self)
+ crate::detail::__rust_thunk___ZNK23test_namespace_bindings10MyTemplateI14DifferentScopeE5valueEv__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(self)
}
}
}
#[ctor::recursively_pinned]
#[repr(C)]
-pub struct __CcTemplateInst21TemplateWithTwoParamsIifE {
- pub value1: i32,
- pub value2: f32,
+pub struct __CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE {
+ __non_field_data: [crate::rust_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],
}
forward_declare::unsafe_define!(
- forward_declare::symbol!("TemplateWithTwoParams<int, float>"),
- crate::__CcTemplateInst21TemplateWithTwoParamsIifE
+ forward_declare::symbol!(
+ "test_namespace_bindings::MyTemplate<test_namespace_bindings::TemplateParam>"
+ ),
+ crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE
);
-impl ctor::CtorNew<()> for __CcTemplateInst21TemplateWithTwoParamsIifE {
+impl ctor::CtorNew<()>
+ for __CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE
+{
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___ZN21TemplateWithTwoParamsIifEC1Ev__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(crate::rust_std::pin::Pin::into_inner_unchecked(dest));
+ 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));
},
)
}
}
-impl<'b> ctor::CtorNew<&'b crate::__CcTemplateInst21TemplateWithTwoParamsIifE>
- for __CcTemplateInst21TemplateWithTwoParamsIifE
-{
- type CtorType = impl ctor::Ctor<Output = Self>;
- #[inline(always)]
- fn ctor_new(args: &'b crate::__CcTemplateInst21TemplateWithTwoParamsIifE) -> 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___ZN21TemplateWithTwoParamsIifEC1ERKS0___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(crate::rust_std::pin::Pin::into_inner_unchecked(dest),__param_0);
- },
- )
- }
-}
-impl<'b> ctor::CtorNew<(&'b crate::__CcTemplateInst21TemplateWithTwoParamsIifE,)>
- for __CcTemplateInst21TemplateWithTwoParamsIifE
-{
- type CtorType = impl ctor::Ctor<Output = Self>;
- #[inline(always)]
- fn ctor_new(args: (&'b crate::__CcTemplateInst21TemplateWithTwoParamsIifE,)) -> Self::CtorType {
- let (arg,) = args;
- <Self as ctor::CtorNew<&'b crate::__CcTemplateInst21TemplateWithTwoParamsIifE>>::ctor_new(
- arg,
- )
- }
-}
-
impl<'b>
- ctor::CtorNew<ctor::RvalueReference<'b, crate::__CcTemplateInst21TemplateWithTwoParamsIifE>>
- for __CcTemplateInst21TemplateWithTwoParamsIifE
+ ctor::CtorNew<
+ &'b crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE,
+ > for __CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE
{
type CtorType = impl ctor::Ctor<Output = Self>;
#[inline(always)]
fn ctor_new(
- args: ctor::RvalueReference<'b, crate::__CcTemplateInst21TemplateWithTwoParamsIifE>,
+ 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___ZN21TemplateWithTwoParamsIifEC1EOS0___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(crate::rust_std::pin::Pin::into_inner_unchecked(dest),__param_0);
+ 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);
},
)
}
}
impl<'b>
- ctor::CtorNew<(ctor::RvalueReference<'b, crate::__CcTemplateInst21TemplateWithTwoParamsIifE>,)>
- for __CcTemplateInst21TemplateWithTwoParamsIifE
+ ctor::CtorNew<(
+ &'b crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE,
+ )> for __CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE
{
type CtorType = impl ctor::Ctor<Output = Self>;
#[inline(always)]
fn ctor_new(
- args: (ctor::RvalueReference<'b, crate::__CcTemplateInst21TemplateWithTwoParamsIifE>,),
+ args: (
+ &'b crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE,
+ ),
) -> Self::CtorType {
let (arg,) = args;
<Self as ctor::CtorNew<
- ctor::RvalueReference<'b, crate::__CcTemplateInst21TemplateWithTwoParamsIifE>,
+ &'b crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE,
>>::ctor_new(arg)
}
}
-impl<'b> ::ctor::Assign<&'b crate::__CcTemplateInst21TemplateWithTwoParamsIifE>
- for __CcTemplateInst21TemplateWithTwoParamsIifE
+impl<'b>
+ ctor::CtorNew<
+ ctor::RvalueReference<
+ 'b,
+ crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE,
+ >,
+ > for __CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE
+{
+ type CtorType = impl ctor::Ctor<Output = Self>;
+ #[inline(always)]
+ fn ctor_new(
+ 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);
+ },
+ )
+ }
+}
+impl<'b>
+ ctor::CtorNew<(
+ ctor::RvalueReference<
+ 'b,
+ crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE,
+ >,
+ )> for __CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE
+{
+ type CtorType = impl ctor::Ctor<Output = Self>;
+ #[inline(always)]
+ fn ctor_new(
+ args: (
+ ctor::RvalueReference<
+ 'b,
+ crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE,
+ >,
+ ),
+ ) -> Self::CtorType {
+ let (arg,) = args;
+ <Self as ctor::CtorNew<
+ ctor::RvalueReference<
+ 'b,
+ crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE,
+ >,
+ >>::ctor_new(arg)
+ }
+}
+
+impl<'b>
+ ::ctor::Assign<
+ &'b crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE,
+ > for __CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE
{
#[inline(always)]
fn assign<'a>(
self: crate::rust_std::pin::Pin<&'a mut Self>,
- __param_0: &'b crate::__CcTemplateInst21TemplateWithTwoParamsIifE,
+ __param_0:&'b crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE,
) {
unsafe {
- crate::detail::__rust_thunk___ZN21TemplateWithTwoParamsIifEaSERKS0___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(self,__param_0);
+ crate::detail::__rust_thunk___ZN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEaSERKS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(self,__param_0);
}
}
}
impl<'b>
- ::ctor::Assign<ctor::RvalueReference<'b, crate::__CcTemplateInst21TemplateWithTwoParamsIifE>>
- for __CcTemplateInst21TemplateWithTwoParamsIifE
+ ::ctor::Assign<
+ ctor::RvalueReference<
+ 'b,
+ crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE,
+ >,
+ > for __CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE
{
#[inline(always)]
fn assign<'a>(
self: crate::rust_std::pin::Pin<&'a mut Self>,
- __param_0: ctor::RvalueReference<'b, crate::__CcTemplateInst21TemplateWithTwoParamsIifE>,
+ __param_0: ctor::RvalueReference<
+ 'b,
+ crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE,
+ >,
) {
unsafe {
- crate::detail::__rust_thunk___ZN21TemplateWithTwoParamsIifEaSEOS0___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(self,__param_0);
+ crate::detail::__rust_thunk___ZN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEaSEOS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(self,__param_0);
+ }
+ }
+}
+
+impl __CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE {
+ #[inline(always)]
+ pub fn Create(
+ value: crate::test_namespace_bindings::TemplateParam,
+ ) -> crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE {
+ unsafe {
+ crate::detail::__rust_thunk___ZN23test_namespace_bindings10MyTemplateINS_13TemplateParamEE6CreateES1___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(value)
+ }
+ }
+}
+
+impl __CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE {
+ #[inline(always)]
+ pub fn value<'a>(&'a self) -> &'a crate::test_namespace_bindings::TemplateParam {
+ unsafe {
+ crate::detail::__rust_thunk___ZNK23test_namespace_bindings10MyTemplateINS_13TemplateParamEE5valueEv__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(self)
+ }
+ }
+}
+
+#[ctor::recursively_pinned]
+#[repr(C, align(4))]
+pub struct __CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE {
+ __non_field_data: [crate::rust_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],
+}
+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>;
+ #[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));
+ },
+ )
+ }
+}
+
+impl<'b> ctor::CtorNew<&'b crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE>
+ for __CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE
+{
+ 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);
+ },
+ )
+ }
+}
+impl<'b> ctor::CtorNew<(&'b crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE,)>
+ for __CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE
+{
+ 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<
+ &'b crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE,
+ >>::ctor_new(arg)
+ }
+}
+
+impl<'b>
+ ctor::CtorNew<
+ ctor::RvalueReference<
+ 'b,
+ crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE,
+ >,
+ > for __CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE
+{
+ type CtorType = impl ctor::Ctor<Output = Self>;
+ #[inline(always)]
+ fn ctor_new(
+ 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);
+ },
+ )
+ }
+}
+impl<'b>
+ ctor::CtorNew<(
+ ctor::RvalueReference<
+ 'b,
+ crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE,
+ >,
+ )> for __CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE
+{
+ type CtorType = impl ctor::Ctor<Output = Self>;
+ #[inline(always)]
+ fn ctor_new(
+ args: (
+ ctor::RvalueReference<
+ 'b,
+ crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE,
+ >,
+ ),
+ ) -> Self::CtorType {
+ let (arg,) = args;
+ <Self as ctor::CtorNew<
+ ctor::RvalueReference<
+ 'b,
+ crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE,
+ >,
+ >>::ctor_new(arg)
+ }
+}
+
+impl<'b> ::ctor::Assign<&'b crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE>
+ for __CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE
+{
+ #[inline(always)]
+ fn assign<'a>(
+ self: crate::rust_std::pin::Pin<&'a mut Self>,
+ __param_0: &'b crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE,
+ ) {
+ unsafe {
+ crate::detail::__rust_thunk___ZN23test_namespace_bindings10MyTemplateIiEaSERKS1___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(self,__param_0);
+ }
+ }
+}
+
+impl<'b>
+ ::ctor::Assign<
+ ctor::RvalueReference<
+ 'b,
+ crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE,
+ >,
+ > for __CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE
+{
+ #[inline(always)]
+ fn assign<'a>(
+ self: crate::rust_std::pin::Pin<&'a mut Self>,
+ __param_0: ctor::RvalueReference<
+ 'b,
+ crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE,
+ >,
+ ) {
+ unsafe {
+ crate::detail::__rust_thunk___ZN23test_namespace_bindings10MyTemplateIiEaSEOS1___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(self,__param_0);
+ }
+ }
+}
+
+impl __CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE {
+ #[inline(always)]
+ pub fn Create(value: i32) -> crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE {
+ unsafe {
+ crate::detail::__rust_thunk___ZN23test_namespace_bindings10MyTemplateIiE6CreateEi__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(value)
+ }
+ }
+}
+
+impl __CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE {
+ #[inline(always)]
+ pub fn value<'a>(&'a self) -> &'a i32 {
+ unsafe {
+ crate::detail::__rust_thunk___ZNK23test_namespace_bindings10MyTemplateIiE5valueEv__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(self)
+ }
+ }
+}
+
+#[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 value2: i32,
+}
+forward_declare::unsafe_define!(
+ forward_declare::symbol!(
+ "test_namespace_bindings::TemplateWithTwoParams<test_namespace_bindings::TemplateWithTwoParams<int, int>, int>"
+ ),
+ crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE
+);
+
+impl ctor::CtorNew<()>
+ for __CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE
+{
+ 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));
+ },
+ )
+ }
+}
+
+impl<'b>
+ ctor::CtorNew<
+ &'b crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE,
+ > for __CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE
+{
+ 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);
+ },
+ )
+ }
+}
+impl<'b>
+ ctor::CtorNew<(
+ &'b crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE,
+ )> for __CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE
+{
+ 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)
+ }
+}
+
+impl<'b>
+ ctor::CtorNew<
+ ctor::RvalueReference<
+ 'b,
+ crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE,
+ >,
+ > for __CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE
+{
+ type CtorType = impl ctor::Ctor<Output = Self>;
+ #[inline(always)]
+ fn ctor_new(
+ 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);
+ },
+ )
+ }
+}
+impl<'b>
+ ctor::CtorNew<(
+ ctor::RvalueReference<
+ 'b,
+ crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE,
+ >,
+ )> for __CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE
+{
+ type CtorType = impl ctor::Ctor<Output = Self>;
+ #[inline(always)]
+ fn ctor_new(
+ 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)
+ }
+}
+
+impl<'b>
+ ::ctor::Assign<
+ &'b crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE,
+ > for __CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE
+{
+ #[inline(always)]
+ fn assign<'a>(
+ self: crate::rust_std::pin::Pin<&'a mut Self>,
+ __param_0:&'b crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE,
+ ) {
+ unsafe {
+ crate::detail::__rust_thunk___ZN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEaSERKS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(self,__param_0);
+ }
+ }
+}
+
+impl<'b>
+ ::ctor::Assign<
+ ctor::RvalueReference<
+ 'b,
+ crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE,
+ >,
+ > for __CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE
+{
+ #[inline(always)]
+ fn assign<'a>(
+ self: crate::rust_std::pin::Pin<&'a mut Self>,
+ __param_0: ctor::RvalueReference<
+ 'b,
+ crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE,
+ >,
+ ) {
+ unsafe {
+ crate::detail::__rust_thunk___ZN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEaSEOS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(self,__param_0);
+ }
+ }
+}
+
+#[ctor::recursively_pinned]
+#[repr(C)]
+pub struct __CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE {
+ pub value1: i32,
+ pub value2: f32,
+}
+forward_declare::unsafe_define!(
+ forward_declare::symbol!("test_namespace_bindings::TemplateWithTwoParams<int, float>"),
+ crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE
+);
+
+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));
+ },
+ )
+ }
+}
+
+impl<'b>
+ ctor::CtorNew<&'b crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE>
+ for __CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE
+{
+ 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);
+ },
+ )
+ }
+}
+impl<'b>
+ ctor::CtorNew<(
+ &'b crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE,
+ )> for __CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE
+{
+ 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<
+ &'b crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE,
+ >>::ctor_new(arg)
+ }
+}
+
+impl<'b>
+ ctor::CtorNew<
+ ctor::RvalueReference<
+ 'b,
+ crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE,
+ >,
+ > for __CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE
+{
+ type CtorType = impl ctor::Ctor<Output = Self>;
+ #[inline(always)]
+ fn ctor_new(
+ 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);
+ },
+ )
+ }
+}
+impl<'b>
+ ctor::CtorNew<(
+ ctor::RvalueReference<
+ 'b,
+ crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE,
+ >,
+ )> for __CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE
+{
+ type CtorType = impl ctor::Ctor<Output = Self>;
+ #[inline(always)]
+ fn ctor_new(
+ args: (
+ ctor::RvalueReference<
+ 'b,
+ crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE,
+ >,
+ ),
+ ) -> Self::CtorType {
+ let (arg,) = args;
+ <Self as ctor::CtorNew<
+ ctor::RvalueReference<
+ 'b,
+ crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE,
+ >,
+ >>::ctor_new(arg)
+ }
+}
+
+impl<'b>
+ ::ctor::Assign<
+ &'b crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE,
+ > for __CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE
+{
+ #[inline(always)]
+ fn assign<'a>(
+ self: crate::rust_std::pin::Pin<&'a mut Self>,
+ __param_0:&'b crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE,
+ ) {
+ unsafe {
+ crate::detail::__rust_thunk___ZN23test_namespace_bindings21TemplateWithTwoParamsIifEaSERKS1___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(self,__param_0);
+ }
+ }
+}
+
+impl<'b>
+ ::ctor::Assign<
+ ctor::RvalueReference<
+ 'b,
+ crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE,
+ >,
+ > for __CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE
+{
+ #[inline(always)]
+ fn assign<'a>(
+ self: crate::rust_std::pin::Pin<&'a mut Self>,
+ __param_0: ctor::RvalueReference<
+ 'b,
+ crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE,
+ >,
+ ) {
+ unsafe {
+ crate::detail::__rust_thunk___ZN23test_namespace_bindings21TemplateWithTwoParamsIifEaSEOS1___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(self,__param_0);
+ }
+ }
+}
+
+#[ctor::recursively_pinned]
+#[repr(C)]
+pub struct __CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE {
+ pub value: crate::test_namespace_bindings::TemplateParam,
+}
+forward_declare::unsafe_define!(
+ forward_declare::symbol!("MyTopLevelTemplate<test_namespace_bindings::TemplateParam>"),
+ crate::__CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE
+);
+
+impl ctor::CtorNew<()>
+ for __CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE
+{
+ 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));
+ },
+ )
+ }
+}
+
+impl<'b>
+ ctor::CtorNew<
+ &'b crate::__CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE,
+ > for __CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE
+{
+ 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);
+ },
+ )
+ }
+}
+impl<'b>
+ ctor::CtorNew<(
+ &'b crate::__CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE,
+ )> for __CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE
+{
+ 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)
+ }
+}
+
+impl<'b>
+ ctor::CtorNew<
+ ctor::RvalueReference<
+ 'b,
+ crate::__CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE,
+ >,
+ > for __CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE
+{
+ type CtorType = impl ctor::Ctor<Output = Self>;
+ #[inline(always)]
+ fn ctor_new(
+ 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);
+ },
+ )
+ }
+}
+impl<'b>
+ ctor::CtorNew<(
+ ctor::RvalueReference<
+ 'b,
+ crate::__CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE,
+ >,
+ )> for __CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE
+{
+ type CtorType = impl ctor::Ctor<Output = Self>;
+ #[inline(always)]
+ fn ctor_new(
+ 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)
+ }
+}
+
+impl<'b>
+ ::ctor::Assign<
+ &'b crate::__CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE,
+ > for __CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE
+{
+ #[inline(always)]
+ fn assign<'a>(
+ self: crate::rust_std::pin::Pin<&'a mut Self>,
+ __param_0:&'b crate::__CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE,
+ ) {
+ unsafe {
+ crate::detail::__rust_thunk___ZN18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEEaSERKS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(self,__param_0);
+ }
+ }
+}
+
+impl<'b>
+ ::ctor::Assign<
+ ctor::RvalueReference<
+ 'b,
+ crate::__CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE,
+ >,
+ > for __CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE
+{
+ #[inline(always)]
+ fn assign<'a>(
+ self: crate::rust_std::pin::Pin<&'a mut Self>,
+ __param_0: ctor::RvalueReference<
+ 'b,
+ crate::__CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE,
+ >,
+ ) {
+ unsafe {
+ crate::detail::__rust_thunk___ZN18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEEaSEOS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(self,__param_0);
}
}
}
@@ -276,142 +1218,477 @@
#[allow(unused_imports)]
use super::*;
extern "C" {
- pub(crate) fn __rust_thunk___ZN10MyTemplateIiEC1Ev__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc<
+ pub(crate) fn __rust_thunk___ZN14DifferentScopeC1Ev<'a>(
+ __this: &'a mut crate::rust_std::mem::MaybeUninit<crate::DifferentScope>,
+ );
+ pub(crate) fn __rust_thunk___ZN14DifferentScopeC1ERKS_<'a, 'b>(
+ __this: &'a mut crate::rust_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>,
+ );
+ pub(crate) fn __rust_thunk___ZN14DifferentScopeaSERKS_<'a, 'b>(
+ __this: crate::rust_std::pin::Pin<&'a mut crate::DifferentScope>,
+ __param_0: &'b crate::DifferentScope,
+ ) -> crate::rust_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>;
+ pub(crate) fn __rust_thunk___ZN23test_namespace_bindings13TemplateParamC1Ev<'a>(
+ __this: &'a mut crate::rust_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,
+ >,
+ __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>,
+ );
+ pub(crate) fn __rust_thunk___ZN23test_namespace_bindings13TemplateParamaSERKS0_<'a, 'b>(
+ __this: crate::rust_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>;
+ 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>;
+ 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<
- crate::__CcTemplateInst10MyTemplateIiE,
+ crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE,
>,
);
- pub(crate) fn __rust_thunk___ZN10MyTemplateIiEC1ERKS0___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc<
+ pub(crate) fn __rust_thunk___ZN23test_namespace_bindings10MyTemplateI14DifferentScopeEC1ERKS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc<
'a,
'b,
>(
__this: &'a mut crate::rust_std::mem::MaybeUninit<
- crate::__CcTemplateInst10MyTemplateIiE,
+ crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE,
>,
- __param_0: &'b crate::__CcTemplateInst10MyTemplateIiE,
+ __param_0:&'b crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE,
);
- pub(crate) fn __rust_thunk___ZN10MyTemplateIiEC1EOS0___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc<
+ pub(crate) fn __rust_thunk___ZN23test_namespace_bindings10MyTemplateI14DifferentScopeEC1EOS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc<
'a,
'b,
>(
__this: &'a mut crate::rust_std::mem::MaybeUninit<
- crate::__CcTemplateInst10MyTemplateIiE,
+ crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE,
>,
- __param_0: ctor::RvalueReference<'b, crate::__CcTemplateInst10MyTemplateIiE>,
+ __param_0: ctor::RvalueReference<
+ 'b,
+ crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE,
+ >,
);
- pub(crate) fn __rust_thunk___ZN10MyTemplateIiEaSERKS0___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc<
+ 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_bindings10MyTemplateI14DifferentScopeE6CreateES1___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
+ value: crate::DifferentScope,
+ ) -> crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE;
+ pub(crate) fn __rust_thunk___ZNK23test_namespace_bindings10MyTemplateI14DifferentScopeE5valueEv__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc<
+ 'a,
+ >(
+ __this:&'a crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE,
+ ) -> &'a crate::DifferentScope;
+ 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<
+ crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE,
+ >,
+ );
+ pub(crate) fn __rust_thunk___ZN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEC1ERKS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc<
'a,
'b,
>(
- __this: crate::rust_std::pin::Pin<&'a mut crate::__CcTemplateInst10MyTemplateIiE>,
- __param_0: &'b crate::__CcTemplateInst10MyTemplateIiE,
- ) -> crate::rust_std::pin::Pin<&'a mut crate::__CcTemplateInst10MyTemplateIiE>;
- pub(crate) fn __rust_thunk___ZN10MyTemplateIiEaSEOS0___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc<
+ __this: &'a mut crate::rust_std::mem::MaybeUninit<
+ crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE,
+ >,
+ __param_0:&'b crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE,
+ );
+ pub(crate) fn __rust_thunk___ZN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEC1EOS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc<
'a,
'b,
>(
- __this: crate::rust_std::pin::Pin<&'a mut crate::__CcTemplateInst10MyTemplateIiE>,
- __param_0: ctor::RvalueReference<'b, crate::__CcTemplateInst10MyTemplateIiE>,
- ) -> crate::rust_std::pin::Pin<&'a mut crate::__CcTemplateInst10MyTemplateIiE>;
- pub(crate) fn __rust_thunk___ZN10MyTemplateIiE6CreateEi__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
+ __this: &'a mut crate::rust_std::mem::MaybeUninit<
+ crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE,
+ >,
+ __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_13TemplateParamEE6CreateES1___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
+ value: crate::test_namespace_bindings::TemplateParam,
+ ) -> crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE;
+ pub(crate) fn __rust_thunk___ZNK23test_namespace_bindings10MyTemplateINS_13TemplateParamEE5valueEv__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc<
+ 'a,
+ >(
+ __this:&'a crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE,
+ ) -> &'a crate::test_namespace_bindings::TemplateParam;
+ 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<
+ crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE,
+ >,
+ );
+ pub(crate) fn __rust_thunk___ZN23test_namespace_bindings10MyTemplateIiEC1ERKS1___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_bindings10MyTemplateIiEE,
+ >,
+ __param_0: &'b crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE,
+ );
+ pub(crate) fn __rust_thunk___ZN23test_namespace_bindings10MyTemplateIiEC1EOS1___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_bindings10MyTemplateIiEE,
+ >,
+ __param_0: ctor::RvalueReference<
+ 'b,
+ crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE,
+ >,
+ );
+ pub(crate) fn __rust_thunk___ZN23test_namespace_bindings10MyTemplateIiEaSERKS1___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_bindings10MyTemplateIiEE,
+ >,
+ __param_0: &'b crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE,
+ ) -> crate::rust_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<
+ &'a mut crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE,
+ >,
+ __param_0: ctor::RvalueReference<
+ 'b,
+ crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE,
+ >,
+ ) -> crate::rust_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(
value: i32,
- ) -> crate::__CcTemplateInst10MyTemplateIiE;
- pub(crate) fn __rust_thunk___ZNK10MyTemplateIiE5valueEv__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc<
+ ) -> crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE;
+ pub(crate) fn __rust_thunk___ZNK23test_namespace_bindings10MyTemplateIiE5valueEv__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc<
'a,
>(
- __this: &'a crate::__CcTemplateInst10MyTemplateIiE,
+ __this: &'a crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE,
) -> &'a i32;
- pub(crate) fn __rust_thunk___ZN21TemplateWithTwoParamsIifEC1Ev__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc<
+ 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>,
+ );
+ 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>,
+ __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>,
+ );
+ 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_bindings21TemplateWithTwoParamsIifEC1Ev__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc<
'a,
>(
__this: &'a mut crate::rust_std::mem::MaybeUninit<
- crate::__CcTemplateInst21TemplateWithTwoParamsIifE,
+ crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE,
>,
);
- pub(crate) fn __rust_thunk___ZN21TemplateWithTwoParamsIifEC1ERKS0___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc<
+ pub(crate) fn __rust_thunk___ZN23test_namespace_bindings21TemplateWithTwoParamsIifEC1ERKS1___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc<
'a,
'b,
>(
__this: &'a mut crate::rust_std::mem::MaybeUninit<
- crate::__CcTemplateInst21TemplateWithTwoParamsIifE,
+ crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE,
>,
- __param_0: &'b crate::__CcTemplateInst21TemplateWithTwoParamsIifE,
+ __param_0:&'b crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE,
);
- pub(crate) fn __rust_thunk___ZN21TemplateWithTwoParamsIifEC1EOS0___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc<
+ pub(crate) fn __rust_thunk___ZN23test_namespace_bindings21TemplateWithTwoParamsIifEC1EOS1___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc<
'a,
'b,
>(
__this: &'a mut crate::rust_std::mem::MaybeUninit<
- crate::__CcTemplateInst21TemplateWithTwoParamsIifE,
+ crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE,
>,
__param_0: ctor::RvalueReference<
'b,
- crate::__CcTemplateInst21TemplateWithTwoParamsIifE,
+ crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE,
>,
);
- pub(crate) fn __rust_thunk___ZN21TemplateWithTwoParamsIifEaSERKS0___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc<
+ pub(crate) fn __rust_thunk___ZN23test_namespace_bindings21TemplateWithTwoParamsIifEaSERKS1___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc<
'a,
'b,
>(
- __this: crate::rust_std::pin::Pin<
- &'a mut crate::__CcTemplateInst21TemplateWithTwoParamsIifE,
- >,
- __param_0: &'b crate::__CcTemplateInst21TemplateWithTwoParamsIifE,
- ) -> crate::rust_std::pin::Pin<&'a mut crate::__CcTemplateInst21TemplateWithTwoParamsIifE>;
- pub(crate) fn __rust_thunk___ZN21TemplateWithTwoParamsIifEaSEOS0___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc<
+ __this:crate::rust_std::pin::Pin<&'a mut crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE>,
+ __param_0:&'b crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE,
+ ) -> crate::rust_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::__CcTemplateInst21TemplateWithTwoParamsIifE,
- >,
+ __this:crate::rust_std::pin::Pin<&'a mut crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE>,
__param_0: ctor::RvalueReference<
'b,
- crate::__CcTemplateInst21TemplateWithTwoParamsIifE,
+ crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE,
>,
- ) -> crate::rust_std::pin::Pin<&'a mut crate::__CcTemplateInst21TemplateWithTwoParamsIifE>;
+ ) -> crate::rust_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>,
+ );
+ 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>,
+ __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>,
+ );
+ 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>;
}
}
const _: () = assert!(rust_std::mem::size_of::<Option<&i32>>() == rust_std::mem::size_of::<&i32>());
-const _: () = assert!(rust_std::mem::size_of::<crate::__CcTemplateInst10MyTemplateIiE>() == 4);
-const _: () = assert!(rust_std::mem::align_of::<crate::__CcTemplateInst10MyTemplateIiE>() == 4);
+const _: () = assert!(rust_std::mem::size_of::<crate::DifferentScope>() == 1);
+const _: () = assert!(rust_std::mem::align_of::<crate::DifferentScope>() == 1);
const _: () = {
- static_assertions::assert_not_impl_all!(crate::__CcTemplateInst10MyTemplateIiE: Copy);
+ static_assertions::assert_not_impl_all!(crate::DifferentScope: Copy);
};
const _: () = {
- static_assertions::assert_not_impl_all!(crate::__CcTemplateInst10MyTemplateIiE: Drop);
+ static_assertions::assert_not_impl_all!(crate::DifferentScope: Drop);
};
-const _: () = assert!(
- memoffset_unstable_const::offset_of!(crate::__CcTemplateInst10MyTemplateIiE, value_) == 0
-);
const _: () =
- assert!(rust_std::mem::size_of::<crate::__CcTemplateInst21TemplateWithTwoParamsIifE>() == 8);
+ assert!(rust_std::mem::size_of::<crate::test_namespace_bindings::TemplateParam>() == 1);
const _: () =
- assert!(rust_std::mem::align_of::<crate::__CcTemplateInst21TemplateWithTwoParamsIifE>() == 4);
+ assert!(rust_std::mem::align_of::<crate::test_namespace_bindings::TemplateParam>() == 1);
+const _: () = {
+ static_assertions::assert_not_impl_all!(crate::test_namespace_bindings::TemplateParam: Copy);
+};
+const _: () = {
+ static_assertions::assert_not_impl_all!(crate::test_namespace_bindings::TemplateParam: Drop);
+};
+
+const _: () = assert!(
+ rust_std::mem::size_of::<
+ crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE,
+ >() == 1
+);
+const _: () = assert!(
+ rust_std::mem::align_of::<
+ crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE,
+ >() == 1
+);
const _: () = {
static_assertions::assert_not_impl_all!(
- crate::__CcTemplateInst21TemplateWithTwoParamsIifE: Copy
+ crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE: Copy
);
};
const _: () = {
static_assertions::assert_not_impl_all!(
- crate::__CcTemplateInst21TemplateWithTwoParamsIifE: Drop
+ crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE: Drop
);
};
const _: () = assert!(
memoffset_unstable_const::offset_of!(
- crate::__CcTemplateInst21TemplateWithTwoParamsIifE,
+ crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateI14DifferentScopeEE,
+ value_
+ ) == 0
+);
+
+const _: () = assert!(
+ rust_std::mem::size_of::<
+ crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE,
+ >() == 1
+);
+const _: () = assert!(
+ rust_std::mem::align_of::<
+ crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE,
+ >() == 1
+);
+const _: () = {
+ static_assertions::assert_not_impl_all!(
+ crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE: Copy
+ );
+};
+const _: () = {
+ static_assertions::assert_not_impl_all!(
+ crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE: Drop
+ );
+};
+const _: () = assert!(
+ memoffset_unstable_const::offset_of!(
+ crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEE,
+ value_
+ ) == 0
+);
+
+const _: () = assert!(
+ rust_std::mem::size_of::<crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE>()
+ == 4
+);
+const _: () = assert!(
+ rust_std::mem::align_of::<crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE>()
+ == 4
+);
+const _: () = {
+ static_assertions::assert_not_impl_all!(
+ crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE: Copy
+ );
+};
+const _: () = {
+ static_assertions::assert_not_impl_all!(
+ crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE: Drop
+ );
+};
+const _: () = assert!(
+ memoffset_unstable_const::offset_of!(
+ crate::__CcTemplateInstN23test_namespace_bindings10MyTemplateIiEE,
+ value_
+ ) == 0
+);
+
+const _: () = assert!(
+ rust_std::mem::size_of::<
+ crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE,
+ >() == 12
+);
+const _: () = assert!(
+ rust_std::mem::align_of::<
+ crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE,
+ >() == 4
+);
+const _: () = {
+ static_assertions::assert_not_impl_all!(
+ crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE: Copy
+ );
+};
+const _: () = {
+ static_assertions::assert_not_impl_all!(
+ crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE: Drop
+ );
+};
+const _: () = assert!(
+ memoffset_unstable_const::offset_of!(
+ crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE,
value1
) == 0
);
const _: () = assert!(
memoffset_unstable_const::offset_of!(
- crate::__CcTemplateInst21TemplateWithTwoParamsIifE,
+ crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEE,
+ value2
+ ) == 8
+);
+
+const _: () = assert!(
+ rust_std::mem::size_of::<
+ crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE,
+ >() == 8
+);
+const _: () = assert!(
+ rust_std::mem::align_of::<
+ crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE,
+ >() == 4
+);
+const _: () = {
+ static_assertions::assert_not_impl_all!(
+ crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE: Copy
+ );
+};
+const _: () = {
+ static_assertions::assert_not_impl_all!(
+ crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE: Drop
+ );
+};
+const _: () = assert!(
+ memoffset_unstable_const::offset_of!(
+ crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE,
+ value1
+ ) == 0
+);
+const _: () = assert!(
+ memoffset_unstable_const::offset_of!(
+ crate::__CcTemplateInstN23test_namespace_bindings21TemplateWithTwoParamsIifEE,
value2
) == 4
);
+
+const _: () = assert!(
+ rust_std::mem::size_of::<
+ crate::__CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE,
+ >() == 1
+);
+const _: () = assert!(
+ rust_std::mem::align_of::<
+ crate::__CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE,
+ >() == 1
+);
+const _: () = {
+ static_assertions::assert_not_impl_all!(
+ crate::__CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE:
+ Copy
+ );
+};
+const _: () = {
+ static_assertions::assert_not_impl_all!(
+ crate::__CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE:
+ Drop
+ );
+};
+const _: () = assert!(
+ memoffset_unstable_const::offset_of!(
+ crate::__CcTemplateInst18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEE,
+ value
+ ) == 0
+);
diff --git a/rs_bindings_from_cc/test/golden/templates_rs_api_impl.cc b/rs_bindings_from_cc/test/golden/templates_rs_api_impl.cc
index 32f3d5b..d4c3f2a 100644
--- a/rs_bindings_from_cc/test/golden/templates_rs_api_impl.cc
+++ b/rs_bindings_from_cc/test/golden/templates_rs_api_impl.cc
@@ -11,89 +11,409 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wthread-safety-analysis"
+extern "C" void __rust_thunk___ZN14DifferentScopeC1Ev(
+ class DifferentScope* __this) {
+ crubit::construct_at(std::forward<decltype(__this)>(__this));
+}
+extern "C" void __rust_thunk___ZN14DifferentScopeC1ERKS_(
+ class DifferentScope* __this, const class DifferentScope& __param_0) {
+ crubit::construct_at(std::forward<decltype(__this)>(__this),
+ std::forward<decltype(__param_0)>(__param_0));
+}
+extern "C" void __rust_thunk___ZN14DifferentScopeC1EOS_(
+ class DifferentScope* __this, class DifferentScope&& __param_0) {
+ crubit::construct_at(std::forward<decltype(__this)>(__this),
+ std::forward<decltype(__param_0)>(__param_0));
+}
+extern "C" void __rust_thunk___ZN14DifferentScopeD1Ev(
+ class DifferentScope* __this) {
+ std::destroy_at(std::forward<decltype(__this)>(__this));
+}
+extern "C" class DifferentScope& __rust_thunk___ZN14DifferentScopeaSERKS_(
+ class DifferentScope* __this, const class DifferentScope& __param_0) {
+ return __this->operator=(std::forward<decltype(__param_0)>(__param_0));
+}
+extern "C" class DifferentScope& __rust_thunk___ZN14DifferentScopeaSEOS_(
+ class DifferentScope* __this, class DifferentScope&& __param_0) {
+ return __this->operator=(std::forward<decltype(__param_0)>(__param_0));
+}
extern "C" void
-__rust_thunk___ZN10MyTemplateIiEC1Ev__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
- class MyTemplate<int>* __this) {
+__rust_thunk___ZN23test_namespace_bindings10MyTemplateI14DifferentScopeEC1Ev__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
+ class test_namespace_bindings::MyTemplate<DifferentScope>* __this) {
crubit::construct_at(std::forward<decltype(__this)>(__this));
}
extern "C" void
-__rust_thunk___ZN10MyTemplateIiEC1ERKS0___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
- class MyTemplate<int>* __this, const class MyTemplate<int>& __param_0) {
+__rust_thunk___ZN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEC1Ev__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
+ class test_namespace_bindings::MyTemplate<
+ test_namespace_bindings::TemplateParam>* __this) {
+ crubit::construct_at(std::forward<decltype(__this)>(__this));
+}
+extern "C" void
+__rust_thunk___ZN23test_namespace_bindings10MyTemplateIiEC1Ev__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
+ class test_namespace_bindings::MyTemplate<int>* __this) {
+ crubit::construct_at(std::forward<decltype(__this)>(__this));
+}
+extern "C" void
+__rust_thunk___ZN23test_namespace_bindings10MyTemplateI14DifferentScopeEC1ERKS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
+ class test_namespace_bindings::MyTemplate<DifferentScope>* __this,
+ const class test_namespace_bindings::MyTemplate<DifferentScope>&
+ __param_0) {
crubit::construct_at(std::forward<decltype(__this)>(__this),
std::forward<decltype(__param_0)>(__param_0));
}
extern "C" void
-__rust_thunk___ZN10MyTemplateIiEC1EOS0___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
- class MyTemplate<int>* __this, class MyTemplate<int>&& __param_0) {
+__rust_thunk___ZN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEC1ERKS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
+ class test_namespace_bindings::MyTemplate<
+ test_namespace_bindings::TemplateParam>* __this,
+ const class test_namespace_bindings::MyTemplate<
+ test_namespace_bindings::TemplateParam>& __param_0) {
crubit::construct_at(std::forward<decltype(__this)>(__this),
std::forward<decltype(__param_0)>(__param_0));
}
extern "C" void
-__rust_thunk___ZN10MyTemplateIiED1Ev__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
- class MyTemplate<int>* __this) {
+__rust_thunk___ZN23test_namespace_bindings10MyTemplateIiEC1ERKS1___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
+ class test_namespace_bindings::MyTemplate<int>* __this,
+ const class test_namespace_bindings::MyTemplate<int>& __param_0) {
+ crubit::construct_at(std::forward<decltype(__this)>(__this),
+ std::forward<decltype(__param_0)>(__param_0));
+}
+extern "C" void
+__rust_thunk___ZN23test_namespace_bindings10MyTemplateI14DifferentScopeEC1EOS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
+ class test_namespace_bindings::MyTemplate<DifferentScope>* __this,
+ class test_namespace_bindings::MyTemplate<DifferentScope>&& __param_0) {
+ crubit::construct_at(std::forward<decltype(__this)>(__this),
+ std::forward<decltype(__param_0)>(__param_0));
+}
+extern "C" void
+__rust_thunk___ZN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEC1EOS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
+ class test_namespace_bindings::MyTemplate<
+ test_namespace_bindings::TemplateParam>* __this,
+ class test_namespace_bindings::MyTemplate<
+ test_namespace_bindings::TemplateParam>&& __param_0) {
+ crubit::construct_at(std::forward<decltype(__this)>(__this),
+ std::forward<decltype(__param_0)>(__param_0));
+}
+extern "C" void
+__rust_thunk___ZN23test_namespace_bindings10MyTemplateIiEC1EOS1___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
+ class test_namespace_bindings::MyTemplate<int>* __this,
+ class test_namespace_bindings::MyTemplate<int>&& __param_0) {
+ crubit::construct_at(std::forward<decltype(__this)>(__this),
+ std::forward<decltype(__param_0)>(__param_0));
+}
+extern "C" void
+__rust_thunk___ZN23test_namespace_bindings10MyTemplateI14DifferentScopeED1Ev__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
+ class test_namespace_bindings::MyTemplate<DifferentScope>* __this) {
std::destroy_at(std::forward<decltype(__this)>(__this));
}
-extern "C" class MyTemplate<int>&
-__rust_thunk___ZN10MyTemplateIiEaSERKS0___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
- class MyTemplate<int>* __this, const class MyTemplate<int>& __param_0) {
+extern "C" void
+__rust_thunk___ZN23test_namespace_bindings10MyTemplateINS_13TemplateParamEED1Ev__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
+ class test_namespace_bindings::MyTemplate<
+ test_namespace_bindings::TemplateParam>* __this) {
+ std::destroy_at(std::forward<decltype(__this)>(__this));
+}
+extern "C" void
+__rust_thunk___ZN23test_namespace_bindings10MyTemplateIiED1Ev__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
+ class test_namespace_bindings::MyTemplate<int>* __this) {
+ std::destroy_at(std::forward<decltype(__this)>(__this));
+}
+extern "C" class test_namespace_bindings::MyTemplate<DifferentScope>&
+__rust_thunk___ZN23test_namespace_bindings10MyTemplateI14DifferentScopeEaSERKS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
+ class test_namespace_bindings::MyTemplate<DifferentScope>* __this,
+ const class test_namespace_bindings::MyTemplate<DifferentScope>&
+ __param_0) {
return __this->operator=(std::forward<decltype(__param_0)>(__param_0));
-} extern "C" class MyTemplate<int>&
-__rust_thunk___ZN10MyTemplateIiEaSEOS0___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
- class MyTemplate<int>* __this, class MyTemplate<int>&& __param_0) {
+} extern "C" class test_namespace_bindings::MyTemplate<
+ test_namespace_bindings::TemplateParam>&
+__rust_thunk___ZN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEaSERKS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
+ class test_namespace_bindings::MyTemplate<
+ test_namespace_bindings::TemplateParam>* __this,
+ const class test_namespace_bindings::MyTemplate<
+ test_namespace_bindings::TemplateParam>& __param_0) {
return __this->operator=(std::forward<decltype(__param_0)>(__param_0));
-} extern "C" class MyTemplate<int>
-__rust_thunk___ZN10MyTemplateIiE6CreateEi__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
+} extern "C" class test_namespace_bindings::MyTemplate<int>&
+__rust_thunk___ZN23test_namespace_bindings10MyTemplateIiEaSERKS1___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
+ class test_namespace_bindings::MyTemplate<int>* __this,
+ const class test_namespace_bindings::MyTemplate<int>& __param_0) {
+ return __this->operator=(std::forward<decltype(__param_0)>(__param_0));
+} extern "C" class test_namespace_bindings::MyTemplate<DifferentScope>&
+__rust_thunk___ZN23test_namespace_bindings10MyTemplateI14DifferentScopeEaSEOS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
+ class test_namespace_bindings::MyTemplate<DifferentScope>* __this,
+ class test_namespace_bindings::MyTemplate<DifferentScope>&& __param_0) {
+ return __this->operator=(std::forward<decltype(__param_0)>(__param_0));
+} extern "C" class test_namespace_bindings::MyTemplate<
+ test_namespace_bindings::TemplateParam>&
+__rust_thunk___ZN23test_namespace_bindings10MyTemplateINS_13TemplateParamEEaSEOS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
+ class test_namespace_bindings::MyTemplate<
+ test_namespace_bindings::TemplateParam>* __this,
+ class test_namespace_bindings::MyTemplate<
+ test_namespace_bindings::TemplateParam>&& __param_0) {
+ return __this->operator=(std::forward<decltype(__param_0)>(__param_0));
+} extern "C" class test_namespace_bindings::MyTemplate<int>&
+__rust_thunk___ZN23test_namespace_bindings10MyTemplateIiEaSEOS1___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
+ class test_namespace_bindings::MyTemplate<int>* __this,
+ class test_namespace_bindings::MyTemplate<int>&& __param_0) {
+ return __this->operator=(std::forward<decltype(__param_0)>(__param_0));
+} extern "C" class test_namespace_bindings::MyTemplate<DifferentScope>
+__rust_thunk___ZN23test_namespace_bindings10MyTemplateI14DifferentScopeE6CreateES1___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
+ class DifferentScope value) {
+ return test_namespace_bindings::MyTemplate<DifferentScope>::Create(
+ std::forward<decltype(value)>(value));
+} extern "C" class test_namespace_bindings::MyTemplate<
+ test_namespace_bindings::TemplateParam>
+__rust_thunk___ZN23test_namespace_bindings10MyTemplateINS_13TemplateParamEE6CreateES1___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
+ class test_namespace_bindings::TemplateParam value) {
+ return test_namespace_bindings::
+ MyTemplate<test_namespace_bindings::TemplateParam>::Create(
+ std::forward<decltype(value)>(value));
+} extern "C" class test_namespace_bindings::MyTemplate<int>
+__rust_thunk___ZN23test_namespace_bindings10MyTemplateIiE6CreateEi__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
int value) {
- return MyTemplate<int>::Create(std::forward<decltype(value)>(value));
-} extern "C" int const&
-__rust_thunk___ZNK10MyTemplateIiE5valueEv__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
- const class MyTemplate<int>* __this) {
+ return test_namespace_bindings::MyTemplate<int>::Create(
+ std::forward<decltype(value)>(value));
+} extern "C" const class DifferentScope&
+__rust_thunk___ZNK23test_namespace_bindings10MyTemplateI14DifferentScopeE5valueEv__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
+ const class test_namespace_bindings::MyTemplate<DifferentScope>* __this) {
return __this->value();
}
-extern "C" void
-__rust_thunk___ZN21TemplateWithTwoParamsIifEC1Ev__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
- class TemplateWithTwoParams<int, float>* __this) {
+extern "C" const class test_namespace_bindings::TemplateParam&
+__rust_thunk___ZNK23test_namespace_bindings10MyTemplateINS_13TemplateParamEE5valueEv__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
+ const class test_namespace_bindings::MyTemplate<
+ test_namespace_bindings::TemplateParam>* __this) {
+ return __this->value();
+}
+extern "C" int const&
+__rust_thunk___ZNK23test_namespace_bindings10MyTemplateIiE5valueEv__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
+ const class test_namespace_bindings::MyTemplate<int>* __this) {
+ return __this->value();
+}
+extern "C" void __rust_thunk___ZN23test_namespace_bindings13TemplateParamC1Ev(
+ class test_namespace_bindings::TemplateParam* __this) {
crubit::construct_at(std::forward<decltype(__this)>(__this));
}
extern "C" void
-__rust_thunk___ZN21TemplateWithTwoParamsIifEC1ERKS0___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
- class TemplateWithTwoParams<int, float>* __this,
- const class TemplateWithTwoParams<int, float>& __param_0) {
+__rust_thunk___ZN23test_namespace_bindings13TemplateParamC1ERKS0_(
+ class test_namespace_bindings::TemplateParam* __this,
+ const class test_namespace_bindings::TemplateParam& __param_0) {
crubit::construct_at(std::forward<decltype(__this)>(__this),
std::forward<decltype(__param_0)>(__param_0));
}
extern "C" void
-__rust_thunk___ZN21TemplateWithTwoParamsIifEC1EOS0___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
- class TemplateWithTwoParams<int, float>* __this,
- class TemplateWithTwoParams<int, float>&& __param_0) {
+__rust_thunk___ZN23test_namespace_bindings13TemplateParamC1EOS0_(
+ class test_namespace_bindings::TemplateParam* __this,
+ class test_namespace_bindings::TemplateParam&& __param_0) {
crubit::construct_at(std::forward<decltype(__this)>(__this),
std::forward<decltype(__param_0)>(__param_0));
}
-extern "C" void
-__rust_thunk___ZN21TemplateWithTwoParamsIifED1Ev__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
- class TemplateWithTwoParams<int, float>* __this) {
+extern "C" void __rust_thunk___ZN23test_namespace_bindings13TemplateParamD1Ev(
+ class test_namespace_bindings::TemplateParam* __this) {
std::destroy_at(std::forward<decltype(__this)>(__this));
}
-extern "C" class TemplateWithTwoParams<int, float>&
-__rust_thunk___ZN21TemplateWithTwoParamsIifEaSERKS0___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
- class TemplateWithTwoParams<int, float>* __this,
- const class TemplateWithTwoParams<int, float>& __param_0) {
+extern "C" class test_namespace_bindings::TemplateParam&
+__rust_thunk___ZN23test_namespace_bindings13TemplateParamaSERKS0_(
+ class test_namespace_bindings::TemplateParam* __this,
+ const class test_namespace_bindings::TemplateParam& __param_0) {
return __this->operator=(std::forward<decltype(__param_0)>(__param_0));
-} extern "C" class TemplateWithTwoParams<int, float>&
-__rust_thunk___ZN21TemplateWithTwoParamsIifEaSEOS0___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
- class TemplateWithTwoParams<int, float>* __this,
- class TemplateWithTwoParams<int, float>&& __param_0) {
+}
+extern "C" class test_namespace_bindings::TemplateParam&
+__rust_thunk___ZN23test_namespace_bindings13TemplateParamaSEOS0_(
+ class test_namespace_bindings::TemplateParam* __this,
+ class test_namespace_bindings::TemplateParam&& __param_0) {
+ return __this->operator=(std::forward<decltype(__param_0)>(__param_0));
+}
+extern "C" void
+__rust_thunk___ZN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEC1Ev__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
+ class test_namespace_bindings::TemplateWithTwoParams<
+ test_namespace_bindings::TemplateWithTwoParams<int, int>, int>*
+ __this) {
+ crubit::construct_at(std::forward<decltype(__this)>(__this));
+}
+extern "C" void
+__rust_thunk___ZN23test_namespace_bindings21TemplateWithTwoParamsIifEC1Ev__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
+ class test_namespace_bindings::TemplateWithTwoParams<int, float>* __this) {
+ crubit::construct_at(std::forward<decltype(__this)>(__this));
+}
+extern "C" void
+__rust_thunk___ZN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEC1ERKS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
+ class test_namespace_bindings::TemplateWithTwoParams<
+ test_namespace_bindings::TemplateWithTwoParams<int, int>, int>* __this,
+ const class test_namespace_bindings::TemplateWithTwoParams<
+ test_namespace_bindings::TemplateWithTwoParams<int, int>, int>&
+ __param_0) {
+ crubit::construct_at(std::forward<decltype(__this)>(__this),
+ std::forward<decltype(__param_0)>(__param_0));
+}
+extern "C" void
+__rust_thunk___ZN23test_namespace_bindings21TemplateWithTwoParamsIifEC1ERKS1___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
+ class test_namespace_bindings::TemplateWithTwoParams<int, float>* __this,
+ const class test_namespace_bindings::TemplateWithTwoParams<int, float>&
+ __param_0) {
+ crubit::construct_at(std::forward<decltype(__this)>(__this),
+ std::forward<decltype(__param_0)>(__param_0));
+}
+extern "C" void
+__rust_thunk___ZN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEC1EOS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
+ class test_namespace_bindings::TemplateWithTwoParams<
+ test_namespace_bindings::TemplateWithTwoParams<int, int>, int>* __this,
+ class test_namespace_bindings::TemplateWithTwoParams<
+ test_namespace_bindings::TemplateWithTwoParams<int, int>, int>&&
+ __param_0) {
+ crubit::construct_at(std::forward<decltype(__this)>(__this),
+ std::forward<decltype(__param_0)>(__param_0));
+}
+extern "C" void
+__rust_thunk___ZN23test_namespace_bindings21TemplateWithTwoParamsIifEC1EOS1___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
+ class test_namespace_bindings::TemplateWithTwoParams<int, float>* __this,
+ class test_namespace_bindings::TemplateWithTwoParams<int, float>&&
+ __param_0) {
+ crubit::construct_at(std::forward<decltype(__this)>(__this),
+ std::forward<decltype(__param_0)>(__param_0));
+}
+extern "C" void
+__rust_thunk___ZN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiED1Ev__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
+ class test_namespace_bindings::TemplateWithTwoParams<
+ test_namespace_bindings::TemplateWithTwoParams<int, int>, int>*
+ __this) {
+ std::destroy_at(std::forward<decltype(__this)>(__this));
+}
+extern "C" void
+__rust_thunk___ZN23test_namespace_bindings21TemplateWithTwoParamsIifED1Ev__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
+ class test_namespace_bindings::TemplateWithTwoParams<int, float>* __this) {
+ std::destroy_at(std::forward<decltype(__this)>(__this));
+}
+extern "C" class test_namespace_bindings::TemplateWithTwoParams<
+ test_namespace_bindings::TemplateWithTwoParams<int, int>, int>&
+__rust_thunk___ZN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEaSERKS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
+ class test_namespace_bindings::TemplateWithTwoParams<
+ test_namespace_bindings::TemplateWithTwoParams<int, int>, int>* __this,
+ const class test_namespace_bindings::TemplateWithTwoParams<
+ test_namespace_bindings::TemplateWithTwoParams<int, int>, int>&
+ __param_0) {
+ return __this->operator=(std::forward<decltype(__param_0)>(__param_0));
+} extern "C" class test_namespace_bindings::TemplateWithTwoParams<int, float>&
+__rust_thunk___ZN23test_namespace_bindings21TemplateWithTwoParamsIifEaSERKS1___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
+ class test_namespace_bindings::TemplateWithTwoParams<int, float>* __this,
+ const class test_namespace_bindings::TemplateWithTwoParams<int, float>&
+ __param_0) {
+ return __this->operator=(std::forward<decltype(__param_0)>(__param_0));
+} extern "C" class test_namespace_bindings::TemplateWithTwoParams<
+ test_namespace_bindings::TemplateWithTwoParams<int, int>, int>&
+__rust_thunk___ZN23test_namespace_bindings21TemplateWithTwoParamsINS0_IiiEEiEaSEOS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
+ class test_namespace_bindings::TemplateWithTwoParams<
+ test_namespace_bindings::TemplateWithTwoParams<int, int>, int>* __this,
+ class test_namespace_bindings::TemplateWithTwoParams<
+ test_namespace_bindings::TemplateWithTwoParams<int, int>, int>&&
+ __param_0) {
+ return __this->operator=(std::forward<decltype(__param_0)>(__param_0));
+} extern "C" class test_namespace_bindings::TemplateWithTwoParams<int, float>&
+__rust_thunk___ZN23test_namespace_bindings21TemplateWithTwoParamsIifEaSEOS1___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
+ class test_namespace_bindings::TemplateWithTwoParams<int, float>* __this,
+ class test_namespace_bindings::TemplateWithTwoParams<int, float>&&
+ __param_0) {
+ return __this->operator=(std::forward<decltype(__param_0)>(__param_0));
+} extern "C" void
+__rust_thunk___ZN18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEEC1Ev__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
+ class MyTopLevelTemplate<test_namespace_bindings::TemplateParam>* __this) {
+ crubit::construct_at(std::forward<decltype(__this)>(__this));
+}
+extern "C" void
+__rust_thunk___ZN18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEEC1ERKS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
+ class MyTopLevelTemplate<test_namespace_bindings::TemplateParam>* __this,
+ const class MyTopLevelTemplate<test_namespace_bindings::TemplateParam>&
+ __param_0) {
+ crubit::construct_at(std::forward<decltype(__this)>(__this),
+ std::forward<decltype(__param_0)>(__param_0));
+}
+extern "C" void
+__rust_thunk___ZN18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEEC1EOS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
+ class MyTopLevelTemplate<test_namespace_bindings::TemplateParam>* __this,
+ class MyTopLevelTemplate<test_namespace_bindings::TemplateParam>&&
+ __param_0) {
+ crubit::construct_at(std::forward<decltype(__this)>(__this),
+ std::forward<decltype(__param_0)>(__param_0));
+}
+extern "C" void
+__rust_thunk___ZN18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEED1Ev__2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
+ class MyTopLevelTemplate<test_namespace_bindings::TemplateParam>* __this) {
+ std::destroy_at(std::forward<decltype(__this)>(__this));
+}
+extern "C" class MyTopLevelTemplate<test_namespace_bindings::TemplateParam>&
+__rust_thunk___ZN18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEEaSERKS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
+ class MyTopLevelTemplate<test_namespace_bindings::TemplateParam>* __this,
+ const class MyTopLevelTemplate<test_namespace_bindings::TemplateParam>&
+ __param_0) {
+ return __this->operator=(std::forward<decltype(__param_0)>(__param_0));
+} extern "C" class MyTopLevelTemplate<test_namespace_bindings::TemplateParam>&
+__rust_thunk___ZN18MyTopLevelTemplateIN23test_namespace_bindings13TemplateParamEEaSEOS2___2f_2fthird_5fparty_2fcrubit_2frs_5fbindings_5ffrom_5fcc_2ftest_2fgolden_3atemplates_5fcc(
+ class MyTopLevelTemplate<test_namespace_bindings::TemplateParam>* __this,
+ class MyTopLevelTemplate<test_namespace_bindings::TemplateParam>&&
+ __param_0) {
return __this->operator=(std::forward<decltype(__param_0)>(__param_0));
}
-static_assert(sizeof(class MyTemplate<int>) == 4);
-static_assert(alignof(class MyTemplate<int>) == 4);
+static_assert(sizeof(class DifferentScope) == 1);
+static_assert(alignof(class DifferentScope) == 1);
-static_assert(sizeof(class TemplateWithTwoParams<int, float>) == 8);
-static_assert(alignof(class TemplateWithTwoParams<int, float>) == 4);
-static_assert(CRUBIT_OFFSET_OF(value1,
- class TemplateWithTwoParams<int, float>) == 0);
-static_assert(CRUBIT_OFFSET_OF(value2,
- class TemplateWithTwoParams<int, float>) == 4);
+static_assert(
+ sizeof(class test_namespace_bindings::MyTemplate<DifferentScope>) == 1);
+static_assert(
+ alignof(class test_namespace_bindings::MyTemplate<DifferentScope>) == 1);
+
+static_assert(sizeof(class test_namespace_bindings::MyTemplate<
+ test_namespace_bindings::TemplateParam>) == 1);
+static_assert(alignof(class test_namespace_bindings::MyTemplate<
+ test_namespace_bindings::TemplateParam>) == 1);
+
+static_assert(sizeof(class test_namespace_bindings::MyTemplate<int>) == 4);
+static_assert(alignof(class test_namespace_bindings::MyTemplate<int>) == 4);
+
+static_assert(sizeof(class test_namespace_bindings::TemplateParam) == 1);
+static_assert(alignof(class test_namespace_bindings::TemplateParam) == 1);
+
+static_assert(
+ sizeof(class test_namespace_bindings::TemplateWithTwoParams<
+ test_namespace_bindings::TemplateWithTwoParams<int, int>, int>) ==
+ 12);
+static_assert(
+ alignof(class test_namespace_bindings::TemplateWithTwoParams<
+ test_namespace_bindings::TemplateWithTwoParams<int, int>, int>) ==
+ 4);
+static_assert(
+ CRUBIT_OFFSET_OF(
+ value1,
+ class test_namespace_bindings::TemplateWithTwoParams<
+ test_namespace_bindings::TemplateWithTwoParams<int, int>, int>) ==
+ 0);
+static_assert(
+ CRUBIT_OFFSET_OF(
+ value2,
+ class test_namespace_bindings::TemplateWithTwoParams<
+ test_namespace_bindings::TemplateWithTwoParams<int, int>, int>) ==
+ 8);
+
+static_assert(
+ sizeof(class test_namespace_bindings::TemplateWithTwoParams<int, float>) ==
+ 8);
+static_assert(
+ alignof(class test_namespace_bindings::TemplateWithTwoParams<int, float>) ==
+ 4);
+static_assert(
+ CRUBIT_OFFSET_OF(
+ value1,
+ class test_namespace_bindings::TemplateWithTwoParams<int, float>) == 0);
+static_assert(
+ CRUBIT_OFFSET_OF(
+ value2,
+ class test_namespace_bindings::TemplateWithTwoParams<int, float>) == 4);
+
+static_assert(
+ sizeof(class MyTopLevelTemplate<test_namespace_bindings::TemplateParam>) ==
+ 1);
+static_assert(
+ alignof(class MyTopLevelTemplate<test_namespace_bindings::TemplateParam>) ==
+ 1);
+static_assert(
+ CRUBIT_OFFSET_OF(
+ value,
+ class MyTopLevelTemplate<test_namespace_bindings::TemplateParam>) == 0);
#pragma clang diagnostic pop