Skip to content

Clarify what Cell::replace returns - #80385

Merged
bors merged 1 commit into
rust-lang:masterfrom
camelid:clarify-cell-replace-docs
Mar 12, 2021
Merged

Clarify what Cell::replace returns#80385
bors merged 1 commit into
rust-lang:masterfrom
camelid:clarify-cell-replace-docs

Conversation

@camelid

Copy link
Copy Markdown
Member

No description provided.

@camelidcamelid added T-libs-api [DEPRECATED; DO NOT USE] A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools labels Dec 26, 2020
@rust-highfive

Copy link
Copy Markdown
Contributor

r? @cramertj

(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 Dec 26, 2020
}

/// Replaces the contained value, and returns it.
/// Replaces the contained value with `val`, and returns the old contained value.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// Replaces the contained value with `val`, and returns the old contained value.
/// Replaces the wrapped value with a new one, returning the old value,
/// without deinitializing either one.
///
/// This function corresponds to [`std::mem::replace`](../mem/fn.replace.html).

Why not just use the same one as RefCell::replace?

@crlf0710crlf0710 added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 15, 2021
@JohnCSimonJohnCSimon added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 1, 2021
@JohnCSimon

Copy link
Copy Markdown

Ping from triage
@camelid - can you please address the comment from the reviewer? Thank you.

@rustbot label: -S-waiting-on-review +S-waiting-on-author

@rustbotrustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 1, 2021
@camelid

Copy link
Copy Markdown
MemberAuthor

can you please address the comment from the reviewer? Thank you.

I was waiting for a review from @cramertj, the assignee.

@camelidcamelid added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 1, 2021
@JohnCSimonJohnCSimon added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 23, 2021
@Dylan-DPC-zz

Copy link
Copy Markdown

r? @Mark-Simulacrum

@Mark-Simulacrum

Copy link
Copy Markdown
Member

@bors r+ rollup

I think this is good. I'm not convinced that reference to mem::replace or the alternative wording is better.

@bors

bors commented Mar 11, 2021

Copy link
Copy Markdown
Collaborator

📌 Commit c71f523 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 Mar 11, 2021
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Mar 11, 2021
…r=Mark-Simulacrum
Clarify what `Cell::replace` returns
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Mar 11, 2021
…r=Mark-Simulacrum
Clarify what `Cell::replace` returns
@JohnTitorJohnTitor mentioned this pull request Mar 11, 2021
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Mar 11, 2021
…r=Mark-Simulacrum
Clarify what `Cell::replace` returns
This was referenced Mar 11, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 12, 2021
Rollup of 11 pull requests
Successful merges:
- rust-lang#80385 (Clarify what `Cell::replace` returns)
- rust-lang#82571 (Rustdoc Json: Add tests for Reexports, and improve jsondocck)
- rust-lang#82860 (Add `-Z unpretty` flag for the THIR)
- rust-lang#82950 (convert slice doc link to intra-doc links)
- rust-lang#82965 (Add spirv extension handling in compiletest)
- rust-lang#82966 (update MSYS2 link in README)
- rust-lang#82979 (Fix "run" button position in error index)
- rust-lang#83001 (Ignore Vim swap files)
- rust-lang#83003 (rustdoc: tweak the search index format)
- rust-lang#83013 (Adjust some `#[cfg]`s to take non-Unix non-Windows operating systems into account)
- rust-lang#83018 (Reintroduce accidentally deleted assertions.)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
@bors
bors merged commit 2f0bbc0 into rust-lang:masterMar 12, 2021
@rustbotrustbot added this to the 1.52.0 milestone Mar 12, 2021
@camelid
camelid deleted the clarify-cell-replace-docs branch March 12, 2021 04:22
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsS-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-libs-api[DEPRECATED; DO NOT USE]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants

@camelid@rust-highfive@JohnCSimon@Dylan-DPC-zz@Mark-Simulacrum@bors@pickfire@crlf0710@cramertj@rustbot