-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Stabilize alloc::Layout const functions #78305
Conversation
r? @m-ou-se (rust_highfive has picked a reviewer for you, use r? to override) |
r? @dtolnay for libs fcp |
Yeah, sorry. In the end I decided to leave the unstable function because I wasn't sure about stabilizing const on it. If it is stabilized I think it should be const but I was uncertain about committing to that in this PR. EDIT: My goal was to stabilize the minimum of "obviously" guaranteed |
cc @rust-lang/wg-const-eval These seem reasonable to me! But let's make sure the const eval group is on board too. This stabilizes a few accessors on @rfcbot fcp merge |
Team member @KodrAus 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! See this document for info about what commands tagged team members can give me. |
These look fine to me |
🔔 This is now entering its final comment period, as per the review above. 🔔 |
The final comment period, with a disposition to merge, as per the review above, is now complete. As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed. The RFC will be merged soon. |
@bors r+ |
📌 Commit 0ba3f4c8551df07253cf757d257743abf3559c76 has been approved by |
⌛ Testing commit 0ba3f4c8551df07253cf757d257743abf3559c76 with merge a10a301e25729da57aaea6643776088fd794b15d... |
@bors r- retry |
@ChrisDenton Looks like you accidentally pulled unrelated commits into this PR with a merge commit. Can you rebase/squash instead? |
@m-ou-se we're debugging the issue: https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/Git.20help.3F |
Stabilizes #67521. In particular the following stable methods are stabilized as const fn: * size * align * from_size_align
It should be fixed now. Thanks! |
@bors r=oli-obk |
📌 Commit 9050d12 has been approved by |
Rollup of 10 pull requests Successful merges: - rust-lang#76941 (Add f{32,64}::is_subnormal) - rust-lang#77697 (Split each iterator adapter and source into individual modules) - rust-lang#78305 (Stabilize alloc::Layout const functions) - rust-lang#78608 (Stabilize refcell_take) - rust-lang#78793 (Clean up `StructuralEq` docs) - rust-lang#79267 (BTreeMap: address namespace conflicts) - rust-lang#79293 (Add test for eval order for a+=b) - rust-lang#79295 (BTreeMap: fix minor testing mistakes in rust-lang#78903) - rust-lang#79297 (BTreeMap: swap the names of NodeRef::new and Root::new_leaf) - rust-lang#79299 (Stabilise `then`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
|
Stabilizes #67521. In particular the following stable methods are stabilized as
const fn
:size
align
from_size_align
Stabilizing
size
andalign
should not be controversial as they are simple (usize and NonZeroUsize) fields and I don't think there's any reason to make them not const compatible in the future. That being true, the other methods are triviallyconst
. The only other issue being returning aResult
from aconst fn
but this has been made more usable by recent stabilizations.