{"action":"reopened","issue":{"url":"https://api.github.com/repos/crabtw/rust-bindgen/issues/282","repository_url":"https://api.github.com/repos/crabtw/rust-bindgen","labels_url":"https://api.github.com/repos/crabtw/rust-bindgen/issues/282/labels{/name}","comments_url":"https://api.github.com/repos/crabtw/rust-bindgen/issues/282/comments","events_url":"https://api.github.com/repos/crabtw/rust-bindgen/issues/282/events","html_url":"https://github.com/crabtw/rust-bindgen/issues/282","id":140158929,"number":282,"title":"'Derive Debug' breaks things","user":{"login":"dimbleby","id":875184,"avatar_url":"https://avatars.githubusercontent.com/u/875184?v=3","gravatar_id":"","url":"https://api.github.com/users/dimbleby","html_url":"https://github.com/dimbleby","followers_url":"https://api.github.com/users/dimbleby/followers","following_url":"https://api.github.com/users/dimbleby/following{/other_user}","gists_url":"https://api.github.com/users/dimbleby/gists{/gist_id}","starred_url":"https://api.github.com/users/dimbleby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimbleby/subscriptions","organizations_url":"https://api.github.com/users/dimbleby/orgs","repos_url":"https://api.github.com/users/dimbleby/repos","events_url":"https://api.github.com/users/dimbleby/events{/privacy}","received_events_url":"https://api.github.com/users/dimbleby/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"Yamakaky","id":1327378,"avatar_url":"https://avatars.githubusercontent.com/u/1327378?v=3","gravatar_id":"","url":"https://api.github.com/users/Yamakaky","html_url":"https://github.com/Yamakaky","followers_url":"https://api.github.com/users/Yamakaky/followers","following_url":"https://api.github.com/users/Yamakaky/following{/other_user}","gists_url":"https://api.github.com/users/Yamakaky/gists{/gist_id}","starred_url":"https://api.github.com/users/Yamakaky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yamakaky/subscriptions","organizations_url":"https://api.github.com/users/Yamakaky/orgs","repos_url":"https://api.github.com/users/Yamakaky/repos","events_url":"https://api.github.com/users/Yamakaky/events{/privacy}","received_events_url":"https://api.github.com/users/Yamakaky/received_events","type":"User","site_admin":false},"milestone":null,"comments":6,"created_at":"2016-03-11T11:21:41Z","updated_at":"2016-03-11T13:28:33Z","closed_at":null,"body":"I have a [binding](https://github.com/dimbleby/rust-c-ares) to [c-ares](https://github.com/c-ares/c-ares).  Regenerating my [FFI](https://github.com/dimbleby/rust-c-ares/blob/master/c-ares-sys/src/ffi.rs) with the latest `bindgen` results in compile errors, for a couple of reasons:\r\n\r\nThe first is:\r\n\r\n    src/ffi.rs:101:5: 101:31 error: the trait `core::fmt::Debug` is not implemented for the type `ffi::Union_Unnamed1` [E0277]\r\n\r\nThat is, `bindgen` is not deriving Debug for this type, so it's not allowed to derive Debug for types containing it.  This one I think is unambiguously a `bindgen` bug.\r\n\r\nThe second is slightly more complex:\r\n\r\n    src/ffi.rs:131:5: 131:31 error: the trait `core::fmt::Debug` is not implemented for the type `libc::unix::in_addr` [E0277]\r\n\r\nThe [c-ares header file](https://github.com/c-ares/c-ares/blob/master/ares.h) makes use of `struct in_addr`, which `bindgen` translates to `Struct_in_addr`.  I make this compile, in a cross-platforrm way, by adding this line:\r\n\r\n```rust\r\npub type Struct_in_addr = ::c_types::in_addr;\r\n```\r\n\r\n... where, on unix systems, `::c_types::in_addr` is just `libc::unix::in_addr` - which doesn't implement Debug.\r\n\r\nIt's not so clear to me what can be done about this one."}}