-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
rename get_{ref, mut} to assume_init_{ref,mut} in Maybeuninit #76047
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rust-highfive
added
the
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
label
Aug 29, 2020
RalfJung
reviewed
Aug 29, 2020
RalfJung
reviewed
Aug 29, 2020
RalfJung
reviewed
Aug 29, 2020
RalfJung
reviewed
Aug 29, 2020
RalfJung
reviewed
Aug 31, 2020
RalfJung
reviewed
Aug 31, 2020
library/core/src/mem/maybe_uninit.rs
Outdated
@@ -624,14 +624,14 @@ impl<T> MaybeUninit<T> { | |||
/// let b = MaybeUninit::<Cell<bool>>::uninit(); | |||
/// // Initialize the `MaybeUninit` using `Cell::set`: | |||
/// unsafe { | |||
/// b.get_ref().set(true); | |||
/// b.assume_init_ref().set(true); | |||
/// // ^^^^^^^^^^^ |
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.
The ^
here do not match the code above any more.
Thanks a lot for picking this up @Dylan-DPC :) |
@bors r=RalfJung |
📌 Commit 943911c has been approved by |
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Aug 31, 2020
Merged
☀️ Test successful - checks-actions, checks-azure |
rust-highfive
added a commit
to rust-lang-nursery/rust-toolstate
that referenced
this pull request
Sep 1, 2020
Tested on commit rust-lang/rust@d9cd4a3. Direct link to PR: <rust-lang/rust#76047> 💔 miri on windows: test-pass → test-fail (cc @oli-obk @eddyb @RalfJung). 💔 miri on linux: test-pass → test-fail (cc @oli-obk @eddyb @RalfJung).
matklad
added a commit
to matklad/rust
that referenced
this pull request
Sep 4, 2020
rename MaybeUninit slice methods The `first` methods conceptually point to the whole slice, not just its first element, so rename them to be consistent with the raw ptr methods on ref-slices. Also, do the equivalent of rust-lang#76047 for the slice reference getters, and make them part of rust-lang#63569 (so far they somehow had no tracking issue). * first_ptr -> slice_as_ptr * first_ptr_mut -> slice_as_mut_ptr * slice_get_ref -> slice_assume_init_ref * slice_get_mut -> slice_assume_init_mut
PG-MANA
added a commit
to PG-MANA/Methylenix
that referenced
this pull request
Sep 4, 2020
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this pull request
Sep 5, 2020
rename MaybeUninit slice methods The `first` methods conceptually point to the whole slice, not just its first element, so rename them to be consistent with the raw ptr methods on ref-slices. Also, do the equivalent of rust-lang#76047 for the slice reference getters, and make them part of rust-lang#63569 (so far they somehow had no tracking issue). * first_ptr -> slice_as_ptr * first_ptr_mut -> slice_as_mut_ptr * slice_get_ref -> slice_assume_init_ref * slice_get_mut -> slice_assume_init_mut
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this pull request
Sep 5, 2020
rename MaybeUninit slice methods The `first` methods conceptually point to the whole slice, not just its first element, so rename them to be consistent with the raw ptr methods on ref-slices. Also, do the equivalent of rust-lang#76047 for the slice reference getters, and make them part of rust-lang#63569 (so far they somehow had no tracking issue). * first_ptr -> slice_as_ptr * first_ptr_mut -> slice_as_mut_ptr * slice_get_ref -> slice_assume_init_ref * slice_get_mut -> slice_assume_init_mut
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Sep 5, 2020
rename MaybeUninit slice methods The `first` methods conceptually point to the whole slice, not just its first element, so rename them to be consistent with the raw ptr methods on ref-slices. Also, do the equivalent of rust-lang#76047 for the slice reference getters, and make them part of rust-lang#63569 (so far they somehow had no tracking issue). * first_ptr -> slice_as_ptr * first_ptr_mut -> slice_as_mut_ptr * slice_get_ref -> slice_assume_init_ref * slice_get_mut -> slice_assume_init_mut
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jun 14, 2021
… r=RalfJung Stabilize `maybe_uninit_ref` This stabilizes `assume_init_{ref,mut}`. FCP is complete: rust-lang#63568 (comment) The renaming was done by rust-lang#76047 and FIXME was resolved by rust-lang#76241, so I think we can now stabilize them finally 🎉 Still, it's const-unstable as `assert_inhabited` is unstable. Closes rust-lang#63568
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
merged-by-bors
This PR was explicitly merged by bors.
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
References #63568
Rework with comments addressed from #66174
Have replaced most of the occurrences I've found, hopefully didn't miss out anything
r? @RalfJung
(thanks @danielhenrymantilla for the initial work on this)