1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
//@ edition: 2024
//@ compile-flags: --diagnostic-width=300
#![feature(coroutines, coroutine_trait, gen_blocks)]
use std::ops::Coroutine;
fn foo() -> impl Coroutine<Yield = u32, Return = ()> { //~ ERROR: Coroutine` is not satisfied
gen { yield 42 }
}
fn bar() -> impl Coroutine<Yield = i64, Return = ()> { //~ ERROR: Coroutine` is not satisfied
gen { yield 42 }
}
fn baz() -> impl Coroutine<Yield = i32, Return = ()> { //~ ERROR: Coroutine` is not satisfied
gen { yield 42 }
}
fn main() {}
|