Advertisement
Guest User

Untitled

a guest
Oct 13th, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. #![feature(gen_future)]
  2. #![feature(generators)]
  3.  
  4. use std::future::Future;
  5.  
  6. fn func() -> impl Future<Output = &'static [&'static str]> {
  7. std::future::from_generator(|| -> &'static [&'static str] { if false { yield (); } &["hi"] })
  8. }
  9.  
  10. fn main() {}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement