You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As can be seen from the C++ code, Foo should have a pointer size, and Bar and Baz as well. However, Bar and Baz in this case only have 1 byte, while the layout test asserts they have 8 bytes.
Bar probably should have something like [u8; 8usize] or [usize; 2usize] instead.
The text was updated successfully, but these errors were encountered:
I think the same thing happens when bindgen decides a type is opaque by itself (as opposed to forcing it with --opaque-type) ( due to #362 for example):
template <int> structhas_int_template { int y; };
has_int_template<0> function();
Looks like u8 is coming from ToOpaque::get_layout's fallback to Layout::for_size(ctx, 1). That seems unlikely to result in valid bindings. I'm not sure how to gracefully refuse to generate bindings for types which trigger that codepath though, and panicing while generating code is less friendly because then you can't even use other bindings which might be correct.
Input C/C++ Header
Bindgen Invocation
Actual Results
Expected Results
As can be seen from the C++ code,
Foo
should have a pointer size, andBar
andBaz
as well. However,Bar
andBaz
in this case only have 1 byte, while the layout test asserts they have 8 bytes.Bar
probably should have something like[u8; 8usize]
or[usize; 2usize]
instead.The text was updated successfully, but these errors were encountered: