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

Add support for in-place map for Vecs of types with same size #16369

Closed
wants to merge 4 commits into from

Conversation

tbu-
Copy link
Contributor

@tbu- tbu- commented Aug 8, 2014

This is implemented using a new struct PartialVec which implements the proper
drop semantics in case the conversion is interrupted by an unwind.

For the old pull request, see #15302.

This is implemented using a new struct `PartialVec` which implements the proper
drop semantics in case the conversion is interrupted by an unwind.
This specifically includes:
- Fix of the tests
- Remove `transmute` between `Vec`s of different types
This is important because the underlying allocator of the `Vec` passes that
information to the deallocator which needs the guarantee that it is the same
parameters that were also passed to the allocation function.
@tbu-
Copy link
Contributor Author

tbu- commented Aug 8, 2014

The transmute of the Vecs has been removed (which relied on details of the unspecified struct layout), the min_align_of of the two types T and U is now checked.

@alexcrichton
Copy link
Member

Closing due to inactivity (21 days inactive)

bors added a commit that referenced this pull request Sep 15, 2014
This is implemented using a new struct PartialVec which implements the proper
drop semantics in case the conversion is interrupted by an unwind.

For the old pull requests, see #15302, #16369.
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 21, 2024
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.

None yet

2 participants