14 lines
228 B
Rust
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));
|
|
}
|