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
struct Foo should not have #[derive(Copy)] because it is unknown whether the blacklisted type is Copy at all. Actually a type being blacklisted is usually a strong indication that it is a complicated type and bindgen shouldn't put any assumption on it at all.
The text was updated successfully, but these errors were encountered:
upsuper
changed the title
Copy should not be derived for blacklisted type
Copy should not be derived if blacklisted type is included
Sep 4, 2017
I looked into the code for a bit, but failed to figure out the best way to fix. Type blacklisting is based on name path, while derive check is based on item. We probably need some higher level check to stop deriving things when any name in blacklist presents in type declaration.
Yeah, the problem is that the checks act in the whitelisted items, and since we store the types that can't be derived instead of the ones that can, effectively all non-whitelisted items end up deriving copy.
Input C/C++ Header
Bindgen Invocation
Actual Results
Expected Results
struct Foo
should not have#[derive(Copy)]
because it is unknown whether the blacklisted type isCopy
at all. Actually a type being blacklisted is usually a strong indication that it is a complicated type and bindgen shouldn't put any assumption on it at all.The text was updated successfully, but these errors were encountered: