rust/tests/ui/generator/pin-box-generator.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
228 B
Rust
Raw Normal View History

2018-11-06 12:47:18 -06:00
// 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));
}