-
Notifications
You must be signed in to change notification settings - Fork 747
--no-derive-debug prevents even manual Debug on enumerations #2076
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
curious, does |
I realized that enumeration are not adding any @@ -3003,13 +3004,16 @@ impl CodeGenerator for Enum {
DerivableTraits::PARTIAL_EQ |
DerivableTraits::EQ,
);
+ let mut derives: Vec<_> = derives.into();
+ derives.extend(
+ item.annotations().derives().iter().map(String::as_str),
+ );
- let derives: Vec<_> = derives.into();
attrs.push(attributes::derives(&derives)); However, the code also talks about backwards compatibility:
And it seems like I could prepare a PR with a fix / implementation based on what kind of change you would prefer (supporting annotations, adding Debug always, or both). |
… derives, or prevent deriving traits Fixes rust-lang#2076
… derives, or prevent deriving traits Fixes #2076
… derives, or prevent deriving traits Fixes rust-lang#2076
Uh oh!
There was an error while loading. Please reload this page.
Input C/C++ Header
Bindgen Invocation
Actual Results
Expected Results
I would expect manual overrides to overrule default settings. The main use case here is that I need Debug on all enumerations, a few structs, but not on most other types.
The text was updated successfully, but these errors were encountered: