-
Notifications
You must be signed in to change notification settings - Fork 746
clang::Type::ret_type should return Option<Type> #141
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
Please make a comment here if you intend to work on this issue. Thank you! |
Hello, I'm not completely sure about the kind of error handling we want for one of the caller, but other similar PR have used expect, so I'll default to that for now. |
jeanphilippeD
added a commit
to jeanphilippeD/rust-bindgen
that referenced
this issue
Oct 29, 2016
jeanphilippeD
added a commit
to jeanphilippeD/rust-bindgen
that referenced
this issue
Oct 29, 2016
jeanphilippeD
added a commit
to jeanphilippeD/rust-bindgen
that referenced
this issue
Oct 29, 2016
Also reduce the scope for unsafe code
jeanphilippeD
added a commit
to jeanphilippeD/rust-bindgen
that referenced
this issue
Oct 29, 2016
Also reduce the scope for unsafe code
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ret_type
does an FFI call toclang_getReturnType
, which returns an invalid type if the input type is not a function type. We should check for the invalid type result, and returnNone
, and otherwise returnSome
.This will save callers from needing to remember to do this check, which is one less foot gun if they forget.
I can mentor whoever would like to work on this.
The text was updated successfully, but these errors were encountered: