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 in_place constructor for Box #106

Merged
merged 1 commit into from
Apr 11, 2020
Merged

Add in_place constructor for Box #106

merged 1 commit into from
Apr 11, 2020

Conversation

dtolnay
Copy link
Owner

@dtolnay dtolnay commented Apr 11, 2020

Closes #102.

The use of list initialization is because the only types that can be boxed and constructed by C are shared structs, and we take care that those are always aggregates. (Opaque Rust types aren't constructible by C , and opaque C types aren't allowed to be placed in Box.)

@dtolnay dtolnay merged commit dd8d06c into master Apr 11, 2020
@dtolnay dtolnay deleted the inplace branch April 11, 2020 21:10
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.

Add in_place constructor for Box
1 participant