-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
indirect-const-stabilize the exact_div
intrinsic
#139163
base: master
Are you sure you want to change the base?
Conversation
Hello lang folks! I propose we const-stabilize the This is the equivalent of It was originally added in #61885 for use converting the byte instance between pointers in the slice iterator to item differences, since an iterator over It's coming up now because I think we should just stabilize it, even if libs decides to change that implementation, because it's not a big deal to allow in const. Everything it can do could be done with And it would be legal to implement it as just @rfcbot fcp merge |
Team member @scottmcm has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! cc @rust-lang/lang-advisors: FCP proposed for lang, please feel free to register concerns. |
FWIW, we don't yet have confirmation whether |
@@ -2786,6 +2786,7 @@ pub const fn carrying_mul_add<T: ~const fallback::CarryingMulAdd<Unsigned = U>, | |||
/// `x % y != 0` or `y == 0` or `x == T::MIN && y == -1` | |||
/// | |||
/// This intrinsic does not have a stable counterpart. | |||
#[rustc_intrinsic_const_stable_indirect] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With this, you should be able to remove the rustc_const_unstable
from the slice_as_chunks
methods. (They will still remain unstable due to #[unstable]
.)
Doing so is a good conformation to ensure there's nothing else preventing their const stabilization.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, good point! Thanks!
As usual please Cc @rust-lang/wg-const-eval on const stabilizations. This is a simple intrinsic, acting on immediate values with a clear spec. So no concerns from my side. |
ee4e4f9
to
308d5ae
Compare
All sounds right. @rfcbot reviewed |
LGTM; |
@rfcbot reviewed |
🔔 This is now entering its final comment period, as per the review above. 🔔 |
See #74985 (comment)