diff options
author | Christian Poveda <christian.poveda@ferrous-systems.com> | 2022-10-21 13:02:54 -0500 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2022-10-22 13:11:45 +0200 |
commit | 0142c0aaf72a3859e319640224740965c2ddeab3 (patch) | |
tree | 37c8c21588ccbf132a8e5d7ca2a331164aad9c4d /bindgen/lib.rs | |
parent | 61ced32b93bb17cb7f31bb252bd07abb125443dc (diff) |
Use panic hooks instead of using `catch_unwind`
One of the advantages of doing this is that `ParseCallbacks` no longer
needs to implement `UnwindSafe` which means that users can rely on
`RefCell` and `Cell` to extract information from the callbacks.
Users relying on `catch_unwind` can still achieve similar behavior using
`std::thread::spawn`.
Fixes #2147.
Diffstat (limited to 'bindgen/lib.rs')
-rw-r--r-- | bindgen/lib.rs | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/bindgen/lib.rs b/bindgen/lib.rs index 880d52a9..22ce603c 100644 --- a/bindgen/lib.rs +++ b/bindgen/lib.rs @@ -2103,11 +2103,6 @@ struct BindgenOptions { merge_extern_blocks: 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) { let mut regex_sets = [ |