Skip to content
This repository has been archived by the owner on Mar 3, 2020. It is now read-only.

Update to use std pin feature and work with latest rust nightly #80

Merged
merged 6 commits into from
Mar 25, 2018

Conversation

Nemo157
Copy link
Contributor

@Nemo157 Nemo157 commented Mar 25, 2018

Blocked on rust-lang/futures-rs#899 being merged

This update brings the impl of Future for PinBox<Future>
Copy link
Collaborator

@withoutboats withoutboats left a 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"] }
Copy link
Collaborator

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 +)*>
Copy link
Collaborator

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?

Copy link
Contributor Author

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.

Copy link
Collaborator

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.

@Nemo157 Nemo157 changed the title WIP: Update to use std pin feature and work with latest rust nightly Update to use std pin feature and work with latest rust nightly Mar 25, 2018
@Nemo157
Copy link
Contributor Author

Nemo157 commented Mar 25, 2018

Re-added Unpin bounds, switched back to upstream futures repo, fixed the UI tests and updated the readme.

@withoutboats withoutboats merged commit 9557b87 into alexcrichton:master Mar 25, 2018
@withoutboats
Copy link
Collaborator

Thanks for performing this update @Nemo157!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants