#![feature(coroutines, coroutine_trait, never_type)] use std::ops::Coroutine; fn mk_gen() -> impl Coroutine { || { loop { yield; } } } fn main() { let gens: [impl Coroutine;2] = [ mk_gen(), mk_gen() ]; //~^ `impl Trait` only allowed in function and inherent method argument and return types }