Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add project_replace #43

Merged
merged 5 commits into from
Jan 10, 2021
Merged

feat: Add project_replace #43

merged 5 commits into from
Jan 10, 2021

Conversation

Marwes
Copy link
Contributor

@Marwes Marwes commented Jan 7, 2021

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

@Marwes Marwes requested a review from taiki-e as a code owner January 7, 2021 13:33
@taiki-e
Copy link
Owner

taiki-e commented Jan 7, 2021

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)

Copy link
Owner

@taiki-e taiki-e left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me. r=me after nit addressed

bors d+

tests/expand/tests/expand/multifields-struct.rs Outdated Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
@bors
Copy link
Contributor

bors bot commented Jan 9, 2021

✌️ 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.

@Marwes Marwes force-pushed the project_replace branch 2 times, most recently from 490ed06 to 34b42bc Compare January 9, 2021 16:37
@taiki-e
Copy link
Owner

taiki-e commented Jan 10, 2021

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

Markus Westerlind added 4 commits January 10, 2021 13:06
To mirror the same method in [pin-project](https://docs.rs/pin-project/1.0.3/pin_project/).

Currently this has to been specified explicitly via an attribute as it
otherwise breaks on `!Sized` types.
@Marwes
Copy link
Contributor Author

Marwes commented Jan 10, 2021

bors r+

@bors
Copy link
Contributor

bors bot commented Jan 10, 2021

Build succeeded:

@bors bors bot merged commit 6f7a40d into taiki-e:master Jan 10, 2021
@Marwes Marwes deleted the project_replace branch January 10, 2021 19:15
@taiki-e
Copy link
Owner

taiki-e commented Jan 11, 2021

Published in 0.2.4.

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.

Consider supporting project_replace
2 participants