summaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorJeffrey Deng <jeffreydeng@live.com>2017-01-30 11:36:56 -0500
committerJeffrey Deng <jeffreydeng@live.com>2017-02-02 16:54:44 -0500
commit09bc83526b51f8c2728dbaee2754a3020243d752 (patch)
tree8611828765180c5ddcb83dec3aeb83685a27881d /src/lib.rs
parentc1aaa6a400d4a92ae442bfeaa188c5303810611b (diff)
Added catch_unwind to catch panic at generator due to missing or incorrect flags
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index d6f3c66e..f2fdc7b4 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -555,6 +555,11 @@ pub struct BindgenOptions {
pub objc_extern_crate: bool,
}
+/// TODO(emilio): This is sort of a lie (see the error message that results from
+/// removing this), but since we don't share references across panic boundaries
+/// it's ok.
+impl ::std::panic::UnwindSafe for BindgenOptions {}
+
impl BindgenOptions {
fn build(&mut self) {
self.whitelisted_vars.build();