mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
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));
|
|
}
|