fn returns_a_closure(&self,io: IO) -> Box<(dyn Fn() -> u64 + 'static)> {} convert to: fn returns_a_closure(&self,io: IO) -> Box<(dyn Fn() -> u64 + '_)> {}