diff options
-rw-r--r-- | src/codegen/mod.rs | 2 | ||||
-rw-r--r-- | tests/expectations/tests/gen-destructors.rs | 4 | ||||
-rw-r--r-- | tests/expectations/tests/public-dtor.rs | 2 | ||||
-rw-r--r-- | tests/expectations/tests/union_dtor.rs | 2 |
4 files changed, 4 insertions, 6 deletions
diff --git a/src/codegen/mod.rs b/src/codegen/mod.rs index 6d9af09b..72c03c37 100644 --- a/src/codegen/mod.rs +++ b/src/codegen/mod.rs @@ -1720,7 +1720,7 @@ impl MethodCodegen for Method { let signature_item = ctx.resolve_item(function.signature()); let mut name = match self.kind() { MethodKind::Constructor => "new".into(), - MethodKind::Destructor => "__bindgen_destructor__".into(), + MethodKind::Destructor => "destruct".into(), _ => function.name().to_owned(), }; diff --git a/tests/expectations/tests/gen-destructors.rs b/tests/expectations/tests/gen-destructors.rs index 14a51d14..4bbc8393 100644 --- a/tests/expectations/tests/gen-destructors.rs +++ b/tests/expectations/tests/gen-destructors.rs @@ -27,7 +27,5 @@ extern "C" { } impl Foo { #[inline] - pub unsafe fn __bindgen_destructor__(&mut self) { - Foo_Foo_destructor(&mut *self) - } + pub unsafe fn destruct(&mut self) { Foo_Foo_destructor(&mut *self) } } diff --git a/tests/expectations/tests/public-dtor.rs b/tests/expectations/tests/public-dtor.rs index 0412b9f4..519cdf67 100644 --- a/tests/expectations/tests/public-dtor.rs +++ b/tests/expectations/tests/public-dtor.rs @@ -22,7 +22,7 @@ extern "C" { } impl cv_String { #[inline] - pub unsafe fn __bindgen_destructor__(&mut self) { + pub unsafe fn destruct(&mut self) { cv_String_String_destructor(&mut *self) } } diff --git a/tests/expectations/tests/union_dtor.rs b/tests/expectations/tests/union_dtor.rs index 1bcb45b6..af9a8c04 100644 --- a/tests/expectations/tests/union_dtor.rs +++ b/tests/expectations/tests/union_dtor.rs @@ -58,7 +58,7 @@ extern "C" { } impl UnionWithDtor { #[inline] - pub unsafe fn __bindgen_destructor__(&mut self) { + pub unsafe fn destruct(&mut self) { UnionWithDtor_UnionWithDtor_destructor(&mut *self) } } |