-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Change untagged_unions to not allow union fields with drop #62330
Conversation
Some changes occurred in diagnostic error codes |
r? @eddyb (rust_highfive has picked a reviewer for you, use r? to override) |
cc tracking issue: #55149 |
a51a67a
to
81949b0
Compare
☔ The latest upstream changes (presumably #62419) made this pull request unmergeable. Please resolve the merge conflicts. |
81949b0
to
0951cca
Compare
r? @RalfJung |
☔ The latest upstream changes (presumably #63029) made this pull request unmergeable. Please resolve the merge conflicts. |
Ping from triage: @SimonSapin, any updates on this? you should also resolve conflicts. |
0951cca
to
d2a4d57
Compare
Rebased, but I’m not the original author of this code so I feel I’m not able to answer some of the review comments. I’d appreciate if someone more familiar with compiler internals is willing to take over. |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
f8b45dd
to
bb5a652
Compare
That fixes my reservations. :) Let's finally do this... thanks to everyone involved! @bors r+ |
📌 Commit 875bdd5 has been approved by |
⌛ Testing commit 875bdd5 with merge da66b096c142097755e3474b7f1b3f2dafd61f9a... |
… r=RalfJung Change untagged_unions to not allow union fields with drop This is a rebase of rust-lang#56440, massaged to solve merge conflicts and make the test suite pass. Change untagged_unions to not allow union fields with drop Union fields may now never have a type with attached destructor. This for example allows unions to use arbitrary field types only by wrapping them in `ManuallyDrop` (or similar). The stable rule remains, that union fields must be `Copy`. We use the new rule for the `untagged_union` feature. Tracking issue: rust-lang#55149
@bors retry rolled up. |
⌛ Testing commit 875bdd5 with merge b3e8ca17bd0ec17cd42fb43f92ff37e4a72fa7b1... |
… r=RalfJung Change untagged_unions to not allow union fields with drop This is a rebase of rust-lang#56440, massaged to solve merge conflicts and make the test suite pass. Change untagged_unions to not allow union fields with drop Union fields may now never have a type with attached destructor. This for example allows unions to use arbitrary field types only by wrapping them in `ManuallyDrop` (or similar). The stable rule remains, that union fields must be `Copy`. We use the new rule for the `untagged_union` feature. Tracking issue: rust-lang#55149
@bors retry rolled up. |
Rollup of 7 pull requests Successful merges: - #62330 (Change untagged_unions to not allow union fields with drop) - #65092 (make is_power_of_two a const function) - #65621 (miri: add write_bytes method to Memory doing bounds-checks and supporting iterators) - #65647 (Remove unnecessary trait bounds and derivations) - #65653 (keep the root dir clean from debugging) - #65660 (Rename `ConstValue::Infer(InferConst::Canonical(..))` to `ConstValue::Bound(..)`) - #65663 (Fix typo from #65214) Failed merges: r? @ghost
Awesome. Thanks to all that worked on this! |
This is a rebase of #56440, massaged to solve merge conflicts and make the test suite pass.
Change untagged_unions to not allow union fields with drop
Union fields may now never have a type with attached destructor. This for example allows unions to use arbitrary field types only by wrapping them in
ManuallyDrop
(or similar).The stable rule remains, that union fields must be
Copy
. We use the new rule for theuntagged_union
feature.Tracking issue: #55149