diff options
author | Jeffrey Deng <jeffreydeng@live.com> | 2017-01-30 11:36:56 -0500 |
---|---|---|
committer | Jeffrey Deng <jeffreydeng@live.com> | 2017-02-02 16:54:44 -0500 |
commit | 09bc83526b51f8c2728dbaee2754a3020243d752 (patch) | |
tree | 8611828765180c5ddcb83dec3aeb83685a27881d /src/chooser.rs | |
parent | c1aaa6a400d4a92ae442bfeaa188c5303810611b (diff) |
Added catch_unwind to catch panic at generator due to missing or incorrect flags
Diffstat (limited to 'src/chooser.rs')
-rw-r--r-- | src/chooser.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/chooser.rs b/src/chooser.rs index 51392d70..d7a20771 100644 --- a/src/chooser.rs +++ b/src/chooser.rs @@ -3,10 +3,11 @@ pub use ir::int::IntKind; pub use ir::enum_ty::{EnumVariantValue, EnumVariantCustomBehavior}; use std::fmt; +use std::panic::UnwindSafe; /// A trait to allow configuring different kinds of types in different /// situations. -pub trait TypeChooser: fmt::Debug { +pub trait TypeChooser: fmt::Debug + UnwindSafe { /// The integer kind an integer macro should have, given a name and the /// value of that macro, or `None` if you want the default to be chosen. fn int_macro(&self, _name: &str, _value: i64) -> Option<IntKind> { |