Handle no return attributes
Partially fixes https://github.com/rust-lang/rust-bindgen/issues/2094
So it looks reasonable, but it's fairly unfortunate that we can't handle neither [[noreturn]] nor __attribute__((noreturn)) which I think are more common ways to deal with this.
So it looks reasonable, but it's fairly unfortunate that we can't handle neither
[[noreturn]]nor__attribute__((noreturn))which I think are more common ways to deal with this.
I can try and handle __attribute_((noreturn)) at least in a future PR. I just need to dig more into clang to figure out how to detect them.
Weird, both test that failed pass on local (but I have a pretty recent clang version so that might be it). I'll try to bring back the UnexposedAttribute logic to check if that works.
Fixed :tada:
@emilio now this supports all 3 options :)
Any chance a new Bindgen release will pick this up anytime soon? I'm excited to use this :)
EDIT: Never mind! This is already out, and I just don't know how to fetch tags :p
I'm experiencing an issue that this PR should have dealt with. I'm thinking the reason could be that this was done for C++ and not for C. Is that restriction here?
Without more information I'm unable to say. However, this feature works on c:
// hello.h
__attribute__((noreturn)) void g(void);
Then you run bindgen hello.h and get
/* automatically generated by rust-bindgen 0.69.4 */
extern "C" {
pub fn g() -> !;
}
I'm still seeing an issue on our end. Let me make a dedicated issue.