Skip to content

No bindings are being generated for destructors #529

@dflemstr

Description

@dflemstr

This is probably mentioned elsewhere since it is such an obvious thing but I couldn't find a tracking issue for it so I thought I would create one.

Input C/C++ Header

class Foo {
public:
    ~Foo();
};

Foo::~Foo() {
}

Bindgen Invokation

$ bindgen test.hpp

Actual Results

/* automatically generated by rust-bindgen */

#[repr(C)]
#[derive(Debug)]
pub struct Foo {
    pub _address: u8,
}
#[test]
fn bindgen_test_layout_Foo() {
    assert_eq!(::std::mem::size_of::<Foo>() , 1usize , concat ! (
               "Size of: " , stringify ! ( Foo ) ));
    assert_eq! (::std::mem::align_of::<Foo>() , 1usize , concat ! (
                "Alignment of " , stringify ! ( Foo ) ));
}

Expected Results

// ... as above ...

impl Drop for Foo {
    fn drop(&mut self) {
      // ... call mangled destructor
    }
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions