-
Notifications
You must be signed in to change notification settings - Fork 743
Opaque types do not honor no-* flags #1238
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
Labels
Comments
Yeah, I don't think these should be copy. Thanks for the report :) |
emilio
added a commit
to emilio/rust-bindgen
that referenced
this issue
Jan 29, 2018
Instead of special-casing. Fixes rust-lang#1238
emilio
added a commit
to emilio/rust-bindgen
that referenced
this issue
Jan 29, 2018
Instead of special-casing. This allows to use the normal flags to control what can be or not derived for them. Arguably deriving Copy / Clone is kind of busted for those, but changing this by default broke tests (RefPtr<ForwardDeclaredType> stopped working for example). So I think this is a good compromise. Fixes rust-lang#1238
bors-servo
pushed a commit
that referenced
this issue
Jan 29, 2018
codegen: Make forward declarations go through the more generic path. Instead of special-casing. This allows to use the normal flags to control what can be or not derived for them. Arguably deriving Copy / Clone is kind of busted for those, but changing this by default broke tests (RefPtr<ForwardDeclaredType> stopped working for example). So I think this is a good compromise. Fixes #1238
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To preface, I'm just starting with bindgen so this could be me simply not thinking about the problem the right way in rust.
I have an allocator function that returns an opaque type
MyTypeT
. I would like the type to not have theCopy
trait so that it's a move-only type.Neither the
--no-derive-copy
nor--no-copy
flags affected the output of bindgen on the type.Input C/C++ Header
Bindgen Invocation
Actual Results
Expected Results
The text was updated successfully, but these errors were encountered: