rust/tests/ui/generator/auxiliary/xcrate-reachable.rs

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

15 lines
208 B
Rust
Raw Normal View History

2018-03-21 20:32:44 -05:00
#![feature(generators, generator_trait)]
use std::ops::Generator;
fn msg() -> u32 {
0
}
pub fn foo() -> impl Generator<(), Yield=(), Return=u32> {
|| {
yield;
return msg();
}
}