2018-09-06 07:41:12 -05:00
|
|
|
// run-pass
|
|
|
|
|
2017-10-07 09:36:28 -05:00
|
|
|
#![feature(generators, generator_trait)]
|
|
|
|
|
|
|
|
use std::ops::Generator;
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let b = |_| 3;
|
|
|
|
let mut a = || {
|
|
|
|
b(yield);
|
|
|
|
};
|
2018-03-19 18:48:41 -05:00
|
|
|
unsafe { a.resume() };
|
2017-10-07 09:36:28 -05:00
|
|
|
}
|