summaryrefslogtreecommitdiff
path: root/src/chooser.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/chooser.rs')
-rw-r--r--src/chooser.rs3
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> {