-
Notifications
You must be signed in to change notification settings - Fork 758
Closed
Description
It happens when the variadic argument function is defined as a class member function. Then like the below, rust-bindgen tries to generate ...
argument for a non-foreign function, which current rustc doesn't support.
Example:
Header:
// In some class
String& AppendWithFormat(const char* formatString, ...);
Generated code:
// In some impl
#[inline]
pub unsafe fn AppendWithFormat(&mut self,
formatString:
*const ::std::os::raw::c_char, ...)
-> *mut Urho3D_String {
Urho3D_String_AppendWithFormat(&mut *self, formatString)
}
Compiling the above generated code:
error: expected pattern, found `...`
--> src/generated.rs:1203:71
|
1203 | *const ::std::os::raw::c_char, ...)
I think we should disable code generation for this case and emit a warning for now, unless there is an easy solution for this.
Metadata
Metadata
Assignees
Labels
No labels