blob: 2dd5ea675233ccbeddf4c21e149355fe0e124b86 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#![feature(generators, generator_trait)]
use std::ops::Generator;
fn msg() -> u32 {
0
}
pub fn foo() -> impl Generator<(), Yield=(), Return=u32> {
|| {
yield;
return msg();
}
}
|