Skip to content

Correct “copies” to “moves” in <Option<T> as From<T>>::from doc, and other copyediting - #88648

Merged
bors merged 3 commits into
rust-lang:masterfrom
kpreid:option
Sep 8, 2021
Merged

Correct “copies” to “moves” in <Option<T> as From<T>>::from doc, and other copyediting#88648
bors merged 3 commits into
rust-lang:masterfrom
kpreid:option

Conversation

@kpreid

Copy link
Copy Markdown
Contributor

The impl<T> From<T> for Option<T> has no Copy or Clone bound, so its operation is guaranteed to be a move. The call site might copy, but the function itself cannot.

Since that would have been a rather small PR, I also reviewed the other documentation in the file and made other improvements (in separate commits): adding periods and commas, linking Deref::Target, and clarifying what "a container" is in FromIterator.

This implementation has no `Copy` or `Clone` bound, so its operation is
guaranteed to be a move. The call site might copy, but the function
itself cannot.
Also linkify `Some` while we're touching the line anyway.
@rust-highfive

Copy link
Copy Markdown
Contributor

r? @Mark-Simulacrum

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 4, 2021
@Mark-Simulacrum

Copy link
Copy Markdown
Member

Since that would have been a rather small PR, I also reviewed the other documentation in the file and made other improvements (in separate commits): adding periods and commas, linking Deref::Target, and clarifying what "a container" is in FromIterator.

FWIW, small PRs are great -- don't worry about adding more in the future.

@bors r+ rollup

@bors

bors commented Sep 6, 2021

Copy link
Copy Markdown
Collaborator

📌 Commit 9a3a2a1 has been approved by Mark-Simulacrum

@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 Sep 6, 2021
@jackh726jackh726 mentioned this pull request Sep 8, 2021
@the8472the8472 added the T-libs Relevant to the library team, which will review and decide on the PR/issue. label Sep 8, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 8, 2021
Rollup of 9 pull requests
Successful merges:
- rust-lang#86263 (Rustdoc: Report Layout of enum variants)
- rust-lang#88541 (Add regression test for rust-lang#74400)
- rust-lang#88553 (Improve diagnostics for unary plus operators (rust-lang#88276))
- rust-lang#88594 (More symbolic doc aliases)
- rust-lang#88648 (Correct “copies” to “moves” in `<Option<T> as From<T>>::from` doc, and other copyediting)
- rust-lang#88691 (Add a regression test for rust-lang#88649)
- rust-lang#88694 (Drop 1.56 stabilizations from 1.55 release notes)
- rust-lang#88712 (Fix docs for `uX::checked_next_multiple_of`)
- rust-lang#88726 (Fix typo in `const_generics` replaced with `adt_const_params` note)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
@bors
bors merged commit 2bbcf92 into rust-lang:masterSep 8, 2021
@rustbotrustbot added this to the 1.57.0 milestone Sep 8, 2021
@kpreid
kpreid deleted the option branch August 26, 2022 17:41
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-libsRelevant 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.

6 participants

@kpreid@rust-highfive@Mark-Simulacrum@bors@the8472@rustbot