blob: 4f7a35e81b80bdb7c96d33c7f18541adb46d4a5b [file] [log] [blame]
#![feature(coroutines, coroutine_trait, never_type)]
use std::ops::Coroutine;
fn mk_gen() -> impl Coroutine<Return=!, Yield=()> {
|| { loop { yield; } }
}
fn main() {
let gens: [impl Coroutine<Return=!, Yield=()>;2] = [ mk_gen(), mk_gen() ];
//~^ `impl Trait` is not allowed in the type of variable bindings
}