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
Note that bpf_prog__bindgen_ty_1 is a struct rather than a union and its fields are bindgen wrappers. This happens even in the presence of --default-non-copy-union-style manually_drop. This arises from
I suggest providing expanded code; otherwise, the maintainers need to figure out what this may be referring to. For instance, from my comment Rust-for-Linux/linux#1137 (comment), reduced from struct bpf_array:
Consider this type from Linux:
This generates:
Note that
bpf_prog__bindgen_ty_1
is a struct rather than a union and its fields are bindgen wrappers. This happens even in the presence of--default-non-copy-union-style manually_drop
. This arises fromrust-bindgen/bindgen/ir/comp.rs
Lines 1756 to 1758 in 59a43e1
Removing that check generates what I expect:
This condition was introduced in 8ac787a but it's not clear to me why. Perhaps this was meant to deal with the fact that unions without any fields are not accepted by the compiler?
cc @emilio
The text was updated successfully, but these errors were encountered: