summaryrefslogtreecommitdiffstats
path: root/src/test/ui/generator/pin-box-generator.rs
blob: c3136f5c0ec823256442f0c576d737578c711386 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// 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));
}