-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Mark <*const _>::align_offset
and <*mut _>::align_offset
as const fn
#90958
Conversation
Thanks for doing this one first! Please add a tracking issue that raises the concern that at compile time we will always get usize::MAX and that it is important that this gets talked about before stabilisation |
@oli-obk done |
@bors r+ rollup |
📌 Commit f926c0e has been approved by |
…askrgr Rollup of 7 pull requests Successful merges: - rust-lang#90733 (Build musl dist artifacts with debuginfo enabled) - rust-lang#90787 (Add `#[inline]`s to `SortedIndexMultiMap`) - rust-lang#90920 (:arrow_up: rust-analyzer) - rust-lang#90933 (Fix await suggestion on non-future type) - rust-lang#90935 (Alphabetize language features) - rust-lang#90949 (update miri) - rust-lang#90958 (Mark `<*const _>::align_offset` and `<*mut _>::align_offset` as `const fn`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Please make sure to Cc @rust-lang/wg-const-eval for every new use of |
This PR marks the following APIs as
const
:const
implementation simply returnsusize::MAX
.Previous discussion: #90607 (comment)
r? @oli-obk