Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #![feature(gen_future)]
- #![feature(generators)]
- use std::future::Future;
- fn func() -> impl Future<Output = &'static [&'static str]> {
- std::future::from_generator(|| -> &'static [&'static str] { if false { yield (); } &["hi"] })
- }
- fn main() {}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement