Uh oh!
There was an error while loading. Please reload this page.
Partially stabilize ptr_alignment_type as alignment_type - #153261
Partially stabilize ptr_alignment_type as alignment_type#153261GrigorenkoPV wants to merge 2 commits into
ptr_alignment_type as alignment_type#153261Conversation
rustbot
commented
Mar 1, 2026
rustbot has assigned @Mark-Simulacrum. Use Why was this reviewer chosen?The reviewer was selected based on:
|
GrigorenkoPV
commented
Mar 1, 2026
For reasons behind what exactly is being stabilized, why moved from @rustbot label -T-libs +T-libs-api +I-libs-api-nominated |
This comment has been minimized.
This comment has been minimized.
477a37d to
d922849Compare
This comment has been minimized.
This comment has been minimized.
GrigorenkoPV
commented
Mar 1, 2026
This currently fails due to So we either have to change our name, patch bumpalo locally, or convince bumpalo to change their and wait until this repo updates to a newer version of bumpalo. |
clarfonthey
commented
Mar 2, 2026
So, part of the reason why I suggested just stabilising the type instead of, for example, the |
d922849 to
2e0ca01CompareGrigorenkoPV
commented
Mar 2, 2026
Good argument, I've updated the PR and the description accordingly. |
This comment has been minimized.
This comment has been minimized.
2e0ca01 to
50f74f1Compare
This comment has been minimized.
This comment has been minimized.
Side note: it's kind of bad form to stabilise stuff under one flag while keeping other methods unstable. You can just name the stuff left out as
( Rereading the PR, you did already rename the feature flags, so, my bad. You can do this suggestion to further separate the names if you want, but it's not actually as necessary as I thought it was, since the stable/unstable features are different. |
eb247cb to
ecd2e44Compare
This comment has been minimized.
This comment has been minimized.
nia-e
commented
Mar 3, 2026
This was discussed in today's @rust-lang/libs-api meeting and we concluded that we'd like to see the methods on |
tgross35
commented
Mar 3, 2026
Could the renames and moves be split to a separate PR from stabilization? There is a lot going on here at once. We also don't need to add deprecated methods/aliases IMO. Users of unstable API need to be aware that there will occasionally be breaking changes, we shouldn't take on the extra burden of trying to smooth this except in rare cases. |
scottmcm
commented
Mar 4, 2026
(Came here from the meeting notes) I'd proposed the partial here, @nia-e, because I figured some pieces of this were "obvious" (assuming we want the type at all) like I'm perfectly happy to see more stabilized if folks are happy with it :) |
scottmcm
commented
Mar 4, 2026
Oh, and +💯 to separating out the move from any stabilizations. That can be landed easily without FCP, but with the mir-opt implications and such it's noisy so valuable to have separate from the feature gating changes. |
This comment has been minimized.
This comment has been minimized.
Amanieu
commented
Mar 31, 2026
@rfcbot merge libs-api |
@Amanieu has proposed to merge this. The next step is review by the rest of the tagged team members: Concerns:
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. |
There was a problem hiding this comment.
suggestion: maybe just delete the old name as part of this PR?
There was a problem hiding this comment.
Sure, given that when this PR lands, there will have been quite some time since the deprecation of the unstable names, I think it's fine to remove them as part of this PR.
d244ed3 to
b45f871Comparerustbot
commented
Apr 18, 2026
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
This comment has been minimized.
This comment has been minimized.
b45f871 to
ad6d994CompareBurntSushi
commented
Jun 3, 2026
In #157226, we seem poised to stabilize on @rfcbot concern non_zero_name_consistency |
theemathas
commented
Jun 3, 2026
@theemathas Thank you! I hadn't seen that. I'm not really convinced by that though on its own. As of now, we're headed in a direction where we have (To me it's not about the |
☔ The latest upstream changes (presumably #157882) made this pull request unmergeable. Please resolve the merge conflicts. |
Hi libs-api! This looks like it's waiting on a new "please do ______" from you. Notably, there's a concern here contradicting the previous agreement in #154237 (comment) -- what do you as a team want? Should someone be making a PR to rename to |
clarfonthey
commented
Jul 30, 2026
FWIW, we don't have this decided in any stable APIs yet, even though
|
nia-e
commented
Aug 4, 2026
cc @BurntSushi - my opinion on this has been that non_null is two words while nonzero is one since only the latter is a single word in the dictionary. we don't have any stable APIs with nonzero currently, so it's not decided by any means, but i'm in favour of having it be one word based on that |
…ottmcm `Alignment`: move from `ptr` to `mem` and rename `as_nonzero` to `as_nonzero_usize` - tracking issue: rust-lang/rust#102070 - split off from rust-lang/rust#153261
tgross35
commented
Aug 15, 2026
I don't like the inconsistency between Interestingly it seems like usage is pretty equally split this century with a slight edge to "nonzero" https://books.google.com/ngrams/graph?content=nonzero%2Cnon+zero%2Cnon-zero&year_start=1800&year_end=2022&corpus=en&smoothing=3 |
clarfonthey
commented
Aug 16, 2026
To be fair, NonZero reads to me as non-zero which makes non_zero seem reasonable. but I get that nonzero is literally a word by itself. |
View all comments
Tracking issue: #102070
Stabilized API
All used to be gated under
ptr_alignment_type, now stabilized underalignment_type:Things not getting stabilized
Remains under
ptr_alignment_type:Moved from
ptr_alignment_typetolayout_for_ptr(#69835):Moved from
ptr_alignment_typetoptr_mask(#98290):const trait impls
These are stabilized as non-const (see "Stabilized APIs"), but
constcounterparts remain unstable under the same feature gates:under
const_convert(#143773)under
const_default(#143894).under
const_cmp(#143800).under
const_clone(#142757).