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

Fix drop order of pinned fields in project_replace #287

Merged
merged 1 commit into from
Oct 4, 2020
Merged

Conversation

taiki-e
Copy link
Owner

@taiki-e taiki-e commented Oct 4, 2020

The fields of the struct and the active enum variant are dropped in declaration order (reference).

The current project_replace drops pinned fields in reverse order of declaration (playground), but this should be in the same order as dropping structs normally.

cc @Diggsey

The fields of the struct and the active enum variant are dropped in
declaration order.

The current `project_replace` drops pinned fields in reverse order of
declaration, but this should be in the same order as dropping structs
normally.

Refs: https://doc.rust-lang.org/reference/destructors.html
@taiki-e
Copy link
Owner Author

taiki-e commented Oct 4, 2020

bors r=Aaron1011

@bors
Copy link
Contributor

bors bot commented Oct 4, 2020

Build succeeded:

@bors bors bot merged commit b35e101 into master Oct 4, 2020
@bors bors bot deleted the drop-order branch October 4, 2020 16:38
bors bot added a commit that referenced this pull request Oct 4, 2020
290: v0.4: Fix drop order of pinned fields in project_replace r=taiki-e a=taiki-e

This is the backport of #287

Co-authored-by: Taiki Endo <te316e89@gmail.com>
@taiki-e taiki-e added the backport-accepted Accepted for backporting to the previous version label Oct 11, 2020
@taiki-e taiki-e added the A-project_replace Area: project_replace method label Nov 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-project_replace Area: project_replace method backport-accepted Accepted for backporting to the previous version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants