Skip to content

Conversation

@joboet
Copy link
Member

@joboet joboet commented Dec 6, 2024

Tracking issue: #133962
ACP: rust-lang/libs-team#468

@joboet joboet added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Dec 6, 2024
@rustbot
Copy link
Collaborator

rustbot commented Dec 6, 2024

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 rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 6, 2024
@rustbot
Copy link
Collaborator

rustbot commented Dec 6, 2024

Some changes occurred to the intrinsics. Make sure the CTFE / Miri interpreter
gets adapted for the changes, if necessary.

cc @rust-lang/miri, @rust-lang/wg-const-eval

@the8472
Copy link
Member

the8472 commented Dec 6, 2024

tests/codegen/intrinsics/select_unpredictable.rs could be updated to test the public method, since that's the one most people will care about.

@tgross35
Copy link
Contributor

tgross35 commented Dec 6, 2024

tests/codegen/intrinsics/select_unpredictable.rs could be updated to test the public method, since that's the one most people will care about.

+1, the usage at

base = select_unpredictable(cmp == Greater, base, mid);
could also be updated.

Docs and API lgtm, r=me with the above.

@joboet
Copy link
Member Author

joboet commented Dec 9, 2024

tests/codegen/intrinsics/select_unpredictable.rs could be updated to test the public method, since that's the one most people will care about.

I'm a bit hesitant about this since other instrinsics tests don't test the public variant either...

@the8472
Copy link
Member

the8472 commented Dec 9, 2024

At least transmute-niched.rs does, but perhaps that one is misplaced.

Another option is to test both the intrinsic and the public method.

Copy link
Contributor

@tgross35 tgross35 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we don't test public versions of the other intrinsics, I suppose this is also fine without it. Though it seems there probably isn't any specific reason they don't exist, so it probably wouldn't hurt to have both if you are up for extending the existing tests.

@tgross35
Copy link
Contributor

@joboet this just needs the tests extended, at your discretion.

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 27, 2024
@joboet
Copy link
Member Author

joboet commented Jan 3, 2025

I've added a new codegen test, adding the tests in the same file resulted in the functions being merged. Iirc there is a codegen flag to disable that, but this seemed cleaner.

@bors r=@tgross35

@bors
Copy link
Collaborator

bors commented Jan 3, 2025

📌 Commit 8f3aa35 has been approved by tgross35

It is now in the queue for this repository.

@bors 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 3, 2025
@the8472
Copy link
Member

the8472 commented Jan 3, 2025

Iirc there is a codegen flag to disable that, but this seemed cleaner.

yes, -Zmerge-functions=disabled. And the benefit of using that is that we have fewer test files. Adding another test has much lower compile overhead than adding another file.

@bors bors merged commit 695da5b into rust-lang:master Jan 4, 2025
6 checks passed
@rustbot rustbot added this to the 1.86.0 milestone Jan 4, 2025
@bors
Copy link
Collaborator

bors commented Jan 4, 2025

⌛ Testing commit 8f3aa35 with merge f17cf74...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants