-
Notifications
You must be signed in to change notification settings - Fork 55
Update to use std pin feature and work with latest rust nightly #80
Conversation
This update brings the impl of Future for PinBox<Future>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pretty much looks good, only one change I didn't understand the reason for. :)
Cargo.toml
Outdated
futures = "0.2.0-alpha" | ||
futures-stable = "0.2.0-alpha" | ||
pin-api = "0.1.1" | ||
futures = { git = "https://github.com/Nemo157/futures-rs", features = ["nightly"] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update to track rust-lang-nursery's master :)
} | ||
} else if boxed && send { | ||
quote_cs! { | ||
::futures::__rt::std::boxed::Box<::futures::__rt::Future< | ||
Item = <! as ::futures::__rt::IsResult>::Ok, | ||
Error = <! as ::futures::__rt::IsResult>::Err, | ||
> + ::futures::__rt::pin_api::Unpin + Send + #(#lifetimes +)*> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was the Unpin
bound removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assumed that this was needed for the old impl<T: Future + Unpin> StableFuture for T
, so now that there is impl<T: Future> StableFuture for T
it is not required anymore. I guess it's still actually correct to specify it even if it's not necessary though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to specify it so that downstream users can rely on it. Its why they tagged them async_move
after all.
As of rust-lang/rust#49194 it's now unsafe to resume a generator, but safe to create an immovable generator. Fixes alexcrichton#74
e37b40f
to
302d294
Compare
Re-added |
Thanks for performing this update @Nemo157! |
Blocked on rust-lang/futures-rs#899 beingmerged