Fix drop handling in hint::select_unpredictable
by Amanieu · Pull Request #139977 · rust-lang/rust (original) (raw)
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 andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation7 Commits1 Checks6 Files changed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
This intrinsic doesn't drop the value that is not selected so this is manually done in the public function that wraps the intrinsic.
This intrinsic doesn't drop the value that is not selected so this is manually done in the public function that wraps the intrinsic.
r? @tgross35
rustbot has assigned @tgross35.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.
Use r?
to explicitly pick a reviewer
rustbot added S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
Relevant to the library team, which will review and decide on the PR/issue.
labels
Some changes occurred to the intrinsics. Make sure the CTFE / Miri interpreter
gets adapted for the changes, if necessary.
cc @rust-lang/miri, @RalfJung, @oli-obk, @lcnr
Good catch!
Would it maybe make sense to restrict this function to Copy
types?
I tried that in #139933 but unfortunately that prevents the use of select_unpredictable
for &mut T
which are not Copy
.
Ah, we'd want NoDrop
but we don't have that on the trait level... shame.
r=me for the implementation part of this PR once CI is happy. t-libs-api will have to make the final call regarding whether we want to support this function on types with drop glue.
📌 Commit e5e5fb9 has been approved by RalfJung
It is now in the queue for this repository.
bors added S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
bors added a commit to rust-lang-ci/rust that referenced this pull request
…iaskrgr
Rollup of 8 pull requests
Successful merges:
- rust-lang#139351 (Autodiff batching2)
- rust-lang#139483 (f*::NAN: guarantee that this is a quiet NaN)
- rust-lang#139498 (Ignore zero-sized types in wasm future-compat warning)
- rust-lang#139967 (Introduce and use specialized
//@ ignore-auxiliary
for test support files instead of using//@ ignore-test
) - rust-lang#139969 (update libc)
- rust-lang#139971 (Make C string merging test work on MIPS)
- rust-lang#139974 (Change
InterpCx::instantiate*
function visibility to pub) - rust-lang#139977 (Fix drop handling in
hint::select_unpredictable
)
r? @ghost
@rustbot
modify labels: rollup
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request
Rollup merge of rust-lang#139977 - Amanieu:select_unpredictable_drop, r=RalfJung
Fix drop handling in hint::select_unpredictable
This intrinsic doesn't drop the value that is not selected so this is manually done in the public function that wraps the intrinsic.
github-actions bot pushed a commit to model-checking/verify-rust-std that referenced this pull request
… r=RalfJung
Fix drop handling in hint::select_unpredictable
This intrinsic doesn't drop the value that is not selected so this is manually done in the public function that wraps the intrinsic.
Labels
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Relevant to the library team, which will review and decide on the PR/issue.