taiki-e / pin-project-lite

A lightweight version of pin-project written with declarative macros.
https://docs.rs/pin-project-lite
Apache License 2.0
216 stars 15 forks source link

feat: Add project_replace #43

Closed Marwes closed 3 years ago

Marwes commented 3 years ago

To mirror the same method in pin-project.

Currently this has to been specified explicitly via an attribute as it otherwise breaks on !Sized types.

Could use some cleanup of the generated code and some tests around drop order (if possible) but other than that this did not seems to be as hard as I thought.

Closes #42

taiki-e commented 3 years ago

Thanks! I will review it in detail next week, but overall it looks great!

pin-project has 4 important tests on project_replace... Could you port them to this PR? (please ignore Tuple* types/tests)

bors[bot] commented 3 years ago

:v: Marwes can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

taiki-e commented 3 years ago

@Marwes Could you rebase and update the output of expandtest (cargo test -p expandtest)? (Perhaps that can fix the CI failure.)

Marwes commented 3 years ago

bors r+

bors[bot] commented 3 years ago

Build succeeded:

taiki-e commented 3 years ago

Published in 0.2.4.