-
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
MaybeUninit
inherent slice methods part 2
#135394
base: master
Are you sure you want to change the base?
Conversation
@rustbot blocked |
401bc11
to
4181931
Compare
@rustbot ready |
☔ The latest upstream changes (presumably #135937) made this pull request unmergeable. Please resolve the merge conflicts. |
4181931
to
6a34d58
Compare
@rustbot label +I-libs-api-nominated This PR renamed (Personally I prefer keeping |
If we're picking new names anyway, can we also change the type of the closure and give them a |
@clarfonthey please always include a reference to the tracking issue in the PR description for changes to an unstable API; otherwise it can become quite tricky to track the changes to a feature. |
Ah, you're totally right; these are all part of a single tracking issue that is now linked in the description. |
Also adding context that may be missed because the PR was split: In terms of |
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.
Please make sure these deprecated unstable methods do actually eventually get removed at some point (couple release cycles). The last time unstable methods were deprecated (pointer to_bits and from_bits), they were forgotten for 2 years (see #127071).
We discussed this in the libs-api meeting. We're mostly happy with the names for now, but this could be re-visited before stabilzation. Also we agree with @RalfJung's suggestion to add an index to the closure. |
6a34d58
to
fa0164e
Compare
Finally got around to this and made the requested change to add an index to the closure for |
This comment has been minimized.
This comment has been minimized.
fa0164e
to
16acb5a
Compare
This comment has been minimized.
This comment has been minimized.
16acb5a
to
372e1d4
Compare
This comment has been minimized.
This comment has been minimized.
372e1d4
to
996da14
Compare
This comment has been minimized.
This comment has been minimized.
996da14
to
12a8599
Compare
This comment has been minimized.
This comment has been minimized.
12a8599
to
ccb137b
Compare
This comment has been minimized.
This comment has been minimized.
ccb137b
to
b707cd9
Compare
This comment has been minimized.
This comment has been minimized.
b707cd9
to
8269132
Compare
These were moved out of #129259 since they require additional libs-api approval. Tracking issue: #117428.
New API surface:
Relevant motivation for these methods; see #129259 for earlier methods' motiviations.
write_filled
sincefilled
is being used as an object here, whereas it's being used as an action infill
.write_with
instead ofwrite_filled_with
since it's shorter and still matches well.write_iter
because it feels completely different from the fill methods, and still has the intent clear.In all of the methods, it felt appropriate to ensure that they contained
write
to clarify that they are effectively just special ways of doingMaybeUninit::write
for each element of a slice.Tracking issue: #117428
r? libs-api