rust/tests/ui/generator/auxiliary/xcrate-reachable.rs
2023-01-11 09:32:08 +00:00

15 lines
208 B
Rust

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