1 2 3 4 5 6 7 8 9 10 11 12 13
// run-pass #![feature(generators, generator_trait)] use std::ops::Generator; fn assert_generator<G: Generator>(_: G) { } fn main() { assert_generator(static || yield); assert_generator(Box::pin(static || yield)); }