Skip to content

MaybeUninit::write: fix doc #140988

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

Merged
merged 1 commit into from
May 15, 2025
Merged

Conversation

mathisbot
Copy link
Contributor

Fix doc for MaybeUninit::write

The documentation refers to the way MaybeUninit stores data internally. The property of not dropping content on context exit is the responsibility of ManuallyDrop.

@rustbot
Copy link
Collaborator

rustbot commented May 14, 2025

r? @tgross35

rustbot has assigned @tgross35.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels May 14, 2025
@tgross35
Copy link
Contributor

Thanks for the fix!

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented May 14, 2025

📌 Commit c610177 has been approved by tgross35

It is now in the queue for this repository.

@bors 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 May 14, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request May 14, 2025
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#140827 (Do not ICE when reassigning in GatherLocalsVisitor on the bad path)
 - rust-lang#140904 (Add an issue template for future-incompatible lints)
 - rust-lang#140953 (Fix a compiletest blessing message)
 - rust-lang#140973 (Update rustix to 1.0.7 for bootstrap)
 - rust-lang#140976 (Add `Ipv4Addr` and `Ipv6Addr` diagnostic items)
 - rust-lang#140988 (MaybeUninit::write: fix doc)
 - rust-lang#140989 (Suggest replace f with f: Box<f> when expr field is short hand)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request May 15, 2025
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#140827 (Do not ICE when reassigning in GatherLocalsVisitor on the bad path)
 - rust-lang#140904 (Add an issue template for future-incompatible lints)
 - rust-lang#140953 (Fix a compiletest blessing message)
 - rust-lang#140973 (Update rustix to 1.0.7 for bootstrap)
 - rust-lang#140976 (Add `Ipv4Addr` and `Ipv6Addr` diagnostic items)
 - rust-lang#140988 (MaybeUninit::write: fix doc)
 - rust-lang#140989 (Suggest replace f with f: Box<f> when expr field is short hand)

r? `@ghost`
`@rustbot` modify labels: rollup
@zachs18
Copy link
Contributor

zachs18 commented May 15, 2025

Should we be mentioning ManuallyDrop here?

The property of not dropping content on context exit is the responsibility of ManuallyDrop.

This is also true, but I don't think is necessarily relevant to this function. The fact that MaybeUninit<T> has a ManuallyDrop<T> field is private and not mentioned anywhere else in the docs, so may be considered an implementation detail. The rest of the sentence being changed here is also talking about MaybeUninit specifically, not ManuallyDrop.

bors added a commit to rust-lang-ci/rust that referenced this pull request May 15, 2025
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#140827 (Do not ICE when reassigning in GatherLocalsVisitor on the bad path)
 - rust-lang#140904 (Add an issue template for future-incompatible lints)
 - rust-lang#140953 (Fix a compiletest blessing message)
 - rust-lang#140973 (Update rustix to 1.0.7 for bootstrap)
 - rust-lang#140976 (Add `Ipv4Addr` and `Ipv6Addr` diagnostic items)
 - rust-lang#140988 (MaybeUninit::write: fix doc)
 - rust-lang#140989 (Suggest replace f with f: Box<f> when expr field is short hand)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 8395461 into rust-lang:master May 15, 2025
6 checks passed
@rustbot rustbot added this to the 1.89.0 milestone May 15, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request May 15, 2025
Rollup merge of rust-lang#140988 - mathisbot:docfix_maybeuninit_write, r=tgross35

MaybeUninit::write: fix doc

# Fix doc for `MaybeUninit::write`

The documentation refers to the way `MaybeUninit` stores data internally. The property of not dropping content on context exit is the responsibility of `ManuallyDrop`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants