Partially stabilize ptr_alignment_type as alignment_type#153261
Partially stabilize ptr_alignment_type as alignment_type#153261GrigorenkoPV wants to merge 1 commit intorust-lang:mainfrom
ptr_alignment_type as alignment_type#153261Conversation
|
rustbot has assigned @Mark-Simulacrum. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
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
d922849
Compare
This comment has been minimized.
This comment has been minimized.
|
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. |
|
So, part of the reason why I suggested just stabilising the type instead of, for example, the |
d922849 to
2e0ca01
Compare
|
Good argument, I've updated the PR and the description accordingly. |
This comment has been minimized.
This comment has been minimized.
2e0ca01 to
50f74f1
Compare
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. |
50f74f1 to
eb247cb
Compare
eb247cb to
ecd2e44
Compare
|
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 was discussed in today's @rust-lang/libs-api meeting and we concluded that we'd like to see the methods on |
|
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. |
|
(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 :) |
|
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. |
Tracking issue: #102070
Stabilized API
All used to be gated under
ptr_alignment_type, now stabilized underalignment_type:Moves and renames
Note that the unstable
Alignmentresided incore::ptr, but is getting stabilized incore::mem. To ease the transition, there's now a temporary deprecated type alias under the old feature gate (won't be stabilized, will be removed):The unstable
Alignment::as_nonzerois getting stabilized asAlignment::as_nonzero_usize. To ease the transition, there's now a temporary deprecated alias under the old feature gate (won't be stabilized, will be removed):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).