pub fn iso(a: F1, b: F2) -> (Box B>, Box A>) where F1: (Fn(A) -> B) + 'static, F2: (Fn(B) -> A) + 'static, { (Box::new(a), Box::new(b)) } pub fn iso_un_option() -> (Box B>, Box A>) { let left = |o_a: Option<_>| o_a.unwrap(); //~^ ERROR overflow let right = |o_b: Option<_>| o_b.unwrap(); iso(left, right) } fn main() {}