diff --git a/src/coroutine.rs b/src/coroutine.rs index 71b2ccc..5d287c5 100644 --- a/src/coroutine.rs +++ b/src/coroutine.rs @@ -147,6 +147,9 @@ impl Coroutine { where F: FnOnce(&Yielder, Input) -> Return, F: 'static, + Input: 'static, + Yield: 'static, + Return: 'static, { Self::with_stack(Default::default(), f) } @@ -162,6 +165,9 @@ impl Coroutine, Input) -> Return, F: 'static, + Input: 'static, + Yield: 'static, + Return: 'static, { // The ABI of the initial function is either "C" or "C-unwind" depending // on whether the "asm-unwind" feature is enabled.