rust/tests/ui/generator/pin-box-generator.rs
2023-01-11 09:32:08 +00:00

14 lines
228 B
Rust

// 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));
}