-
Notifications
You must be signed in to change notification settings - Fork 146
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
Update union code to use ManuallyDrop #135
Update union code to use ManuallyDrop #135
Conversation
A Rust breaking change to the untagged_unions feature, means that no union fields may have destructors, so we need use ManuallyDrop also around the inline union field.
e78b4da
to
d6bfa84
Compare
This change takes us further on the road to stable unions for SmallVec |
@bors-servo r+ Thanks! |
📌 Commit d6bfa84 has been approved by |
…beck Update union code to use ManuallyDrop At the time of this writing, this breaking change is *proposed*, see rust-lang/rust/pull/56440. Smallvec would have to be updated before the change can be merged upstream. Thanks! A Rust breaking change to the untagged_unions feature means that no union fields may have destructors, so we need use ManuallyDrop also around the inline union field. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-smallvec/135) <!-- Reviewable:end -->
☀️ Test successful - status-travis |
I've reviewed the surrounding code, and it's a bit hard to talk about soundness with the unsafe code guidelines making a rumbling noise in the background, but without clear pronouncements. One place of worry about this PR could be if there is a practical difference of uninitialized value inside With MaybeUninit the question remains about partial initialization and the soundness of forming |
Version 0.6.8 Change log: * Don't leak memory if an iterator panics during `extend` (#137) * Update the unstable `union` feature for better forward compatibility (#135) <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-smallvec/138) <!-- Reviewable:end -->
At the time of this writing, this breaking change is proposed, see rust-lang/rust/pull/56440.
Smallvec would have to be updated before the change can be merged upstream. Thanks!
A Rust breaking change to the untagged_unions feature means that no
union fields may have destructors, so we need use ManuallyDrop also
around the inline union field.
This change is