Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #![feature(async_await)]
- use std::future::Future;
- struct S;
- impl S {
- // is there any way to declare that the returned
- // (and implicitly constructed) future will not
- // hold on to &self in any way?
- async fn f(&self) {}
- fn why(&self) -> impl Future<Output = ()> {
- self.f()
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement