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 18:47:18 +00:00
// run-pass
#![feature(generators, generator_trait)]
2023-10-19 16:06:43 +00:00
use std::ops::Coroutine;
2018-11-06 18:47:18 +00:00
2023-10-19 16:06:43 +00:00
fn assert_generator<G: Coroutine>(_: G) {
2018-11-06 18:47:18 +00:00
}
fn main() {
assert_generator(static || yield);
assert_generator(Box::pin(static || yield));
}