SHARE
TWEET

Untitled

a guest Oct 13th, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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() {}
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top