Skip to content

Conversation

@taiki-e
Copy link
Member

@taiki-e taiki-e commented Nov 28, 2020

NOTE(taiki-e): It's recommended to see #2170 (comment), if you are considering to do the same as this PR.

pin-project-lite 0.2 supports enum. However, unfortunately, some enums (Either, (Try)MaybeDone) that require pin-projection used in futures-util have tuple variants and are also public APIs, so, we cannot use pin-project-lite for these enums.

futures-test also depends on pin-project, but this PR doesn't touch that as that needs support for custom Drop implementation (taiki-e/pin-project-lite#25) and futures-test is a crate intended to be used as a dev-dependency.

Closes #2170

@taiki-e taiki-e marked this pull request as ready for review November 28, 2020 04:34
@taiki-e
Copy link
Member Author

taiki-e commented Nov 28, 2020

compile time with no-default-features + std feature (cargo build --release -Ztimings --no-default-features --features std)
before (master):

after (this pr):

Note: compile time with default features doesn't change much, as pin-project-lite readme says.

@cramertj cramertj self-requested a review December 9, 2020 00:10
@taiki-e taiki-e merged commit da71932 into rust-lang:master Dec 9, 2020
@taiki-e taiki-e deleted the pin-project-lite branch December 9, 2020 08:47
@taiki-e
Copy link
Member Author

taiki-e commented Dec 9, 2020

@cramertj Thanks for the review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace pin-project with pin-project-lite

2 participants