Skip to content

rename get_{ref, mut} to assume_init_{ref,mut} in Maybeuninit - #76047

Merged
bors merged 5 commits into
rust-lang:masterfrom
Dylan-DPC-zz:rename/maybe
Sep 1, 2020
Merged

rename get_{ref, mut} to assume_init_{ref,mut} in Maybeuninit#76047
bors merged 5 commits into
rust-lang:masterfrom
Dylan-DPC-zz:rename/maybe

Conversation

@Dylan-DPC-zz

Copy link
Copy Markdown

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)

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 29, 2020
Comment threadlibrary/core/src/fmt/float.rs
Comment threadlibrary/core/src/mem/maybe_uninit.rs Outdated
Comment threadlibrary/core/src/mem/maybe_uninit.rs Outdated
Comment threadlibrary/std/src/io/util.rs
Comment threadlibrary/core/src/fmt/float.rs
Comment threadlibrary/core/src/mem/maybe_uninit.rs Outdated
/// unsafe {
/// b.get_ref().set(true);
/// b.assume_init_ref().set(true);
/// // ^^^^^^^^^^^

@RalfJungRalfJungAug 31, 2020

Copy link
Copy Markdown
Member

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.

@RalfJung

Copy link
Copy Markdown
Member

Thanks a lot for picking this up @Dylan-DPC :)
r=me with the two remaining minor nits resolved.

@Dylan-DPC-zz

Copy link
Copy Markdown
Author

@bors r=RalfJung

@bors

bors commented Aug 31, 2020

Copy link
Copy Markdown
Collaborator

📌 Commit 943911c has been approved by RalfJung

@borsbors 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
@bors

bors commented Sep 1, 2020

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 943911c with merge d9cd4a3...

@borsbors mentioned this pull request Sep 1, 2020
@bors

bors commented Sep 1, 2020

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-actions, checks-azure
Approved by: RalfJung
Pushing d9cd4a3 to master...

@borsbors added the merged-by-bors This PR was explicitly merged by bors. label Sep 1, 2020
@bors
bors merged commit d9cd4a3 into rust-lang:masterSep 1, 2020
@rust-highfive

Copy link
Copy Markdown
Contributor

📣 Toolstate changed by #76047!

Tested on commit d9cd4a3.
Direct link to PR: #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).

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
@JohnTitorJohnTitor mentioned this pull request Jun 13, 2021
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.
Closesrust-lang#63568
@cuvipercuviper added this to the 1.48.0 milestone Nov 17, 2023
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-borsThis PR was explicitly merged by bors.S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@Dylan-DPC-zz@RalfJung@bors@rust-highfive@cuviper@Dylan-DPC