Skip to content

Conversation

@BD103
Copy link
Contributor

@BD103 BD103 commented Nov 10, 2025

The private ptr_rotate() function used a custom const_min() function because std::cmp::min() wasn't const. cmp::min() is now unstably const, so we can switch to that instead.

@rust-lang/wg-const-eval The rustc dev guide said to ping you all when using #[rustc_allow_const_fn_unstable(...)]. Please let me know if I used it correctly!

`cmp::min()` is unstably const, but `ptr_rotate()` is a private function so it's safe to allow.
@rustbot
Copy link
Collaborator

rustbot commented Nov 10, 2025

⚠️ #[rustc_allow_const_fn_unstable] needs careful audit to avoid accidentally exposing unstable
implementation details on stable.

cc @rust-lang/wg-const-eval

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Nov 10, 2025
@rustbot
Copy link
Collaborator

rustbot commented Nov 10, 2025

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
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

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

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants