Skip to content

docs(library/core/src/pin): fix typo "necessarily" -> "necessary" #139749

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

Conversation

ruancomelli
Copy link
Contributor

Fix a typo in library/core/src/pin.rs, from

As we'll see later, this is necessarily from the time the value is first pinned until the end of its lifespan.

to

As we'll see later, this is necessary from the time the value is first pinned until the end of its lifespan.

(my emphasis).

@rustbot
Copy link
Collaborator

rustbot commented Apr 13, 2025

r? @joboet

rustbot has assigned @joboet.
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 Apr 13, 2025
@joboet
Copy link
Member

joboet commented Apr 13, 2025

"necessarily" is correct here, this sentence expresses a logical conclusion. But I understand why this sentence might lead to confusion, it's hard to infer that the "this" refers to the timespan of validity. Perhaps you can find a better way of expressing it?

@rustbot author

@rustbot rustbot 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 Apr 13, 2025
@rustbot
Copy link
Collaborator

rustbot commented Apr 13, 2025

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@ruancomelli
Copy link
Contributor Author

Hey @joboet, thank you for your review! I tried rewriting in a clearer way, as you suggested.

However, I must confess that this is my first day learning about pinning in Rust - so, even though I think the new version is correct, it might sound verbose/obvious/redundant for more experienced folks:

As we'll see later, once a value is pinned, it is necessarily valid at its memory location until the end of its lifespan.

I also came up with the following variant, which is equally clear, but might be slightly different from what the original text meant:

As we'll see later, the guarantee of validity begins when the value is first pinned and necessarily lasts until the end of its lifespan.

Please let me know if you'd prefer this second version!

@rustbot ready

@rustbot rustbot 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 Apr 13, 2025
@joboet
Copy link
Member

joboet commented May 15, 2025

Sorry for not getting back to this sooner. The new version seems fine to me and is definitely an improvement over the current state, even if I'm still not quite satisfied with the paragraph.

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented May 15, 2025

📌 Commit 6f23f16 has been approved by joboet

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented May 15, 2025

🌲 The tree is currently closed for pull requests below priority 100. This pull request will be tested once the tree is reopened.

@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 15, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request May 15, 2025
…pin/fix-typo-necessarily-to-necessary, r=joboet

docs(library/core/src/pin): fix typo "necessarily" -> "necessary"

Fix a typo in [`library/core/src/pin.rs`](https://github.com/ruancomelli/rust/blob/14662fabeb69fe5ab6c6e68051bf9f80d4aaaa35/library/core/src/pin.rs), from

> As we'll see later, this is **necessarily** from the time the value is first pinned until the end of its lifespan.

to

> As we'll see later, this is **necessary** from the time the value is first pinned until the end of its lifespan.

(my emphasis).
compiler-errors added a commit to compiler-errors/rust that referenced this pull request May 15, 2025
…pin/fix-typo-necessarily-to-necessary, r=joboet

docs(library/core/src/pin): fix typo "necessarily" -> "necessary"

Fix a typo in [`library/core/src/pin.rs`](https://github.com/ruancomelli/rust/blob/14662fabeb69fe5ab6c6e68051bf9f80d4aaaa35/library/core/src/pin.rs), from

> As we'll see later, this is **necessarily** from the time the value is first pinned until the end of its lifespan.

to

> As we'll see later, this is **necessary** from the time the value is first pinned until the end of its lifespan.

(my emphasis).
bors added a commit to rust-lang-ci/rust that referenced this pull request May 15, 2025
…mpiler-errors

Rollup of 14 pull requests

Successful merges:

 - rust-lang#139749 (docs(library/core/src/pin): fix typo "necessarily" -> "necessary")
 - rust-lang#140130 (Add LLDB providers for BTreeMap and BTreeSet)
 - rust-lang#140685 (Simplify `Vec::as_non_null` implementation and make it `const`)
 - rust-lang#140712 (normalization: avoid incompletely constraining GAT args)
 - rust-lang#140768 (Improve `dangerous_implicit_aurorefs` diagnostic output)
 - rust-lang#140834 (move (or remove) some impl Trait tests)
 - rust-lang#140910 (Remove `stable` attribute from wasi fs (read_exact|write_all)_at)
 - rust-lang#140947 (Flush errors before deep normalize in `dropck_outlives`)
 - rust-lang#140966 (Remove #![feature(let_chains)] from library and src/librustdoc)
 - rust-lang#140977 ([win] Use a dash instead of slash for linker to avoid breaking lld)
 - rust-lang#140990 (VxWorks: updates from recent libc versions)
 - rust-lang#141003 (Improve ternary operator recovery)
 - rust-lang#141013 (Implement methods to set STARTUPINFO flags for Command API on Windows)
 - rust-lang#141026 (rustc-dev-guide subtree update)

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 8 pull requests

Successful merges:

 - rust-lang#139749 (docs(library/core/src/pin): fix typo "necessarily" -> "necessary")
 - rust-lang#140685 (Simplify `Vec::as_non_null` implementation and make it `const`)
 - rust-lang#140712 (normalization: avoid incompletely constraining GAT args)
 - rust-lang#140768 (Improve `dangerous_implicit_aurorefs` diagnostic output)
 - rust-lang#140947 (Flush errors before deep normalize in `dropck_outlives`)
 - rust-lang#140966 (Remove #![feature(let_chains)] from library and src/librustdoc)
 - rust-lang#140990 (VxWorks: updates from recent libc versions)
 - rust-lang#141027 (remove `RustfmtState` to reduce `initial_rustfmt` complexity)

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#139749 (docs(library/core/src/pin): fix typo "necessarily" -> "necessary")
 - rust-lang#140685 (Simplify `Vec::as_non_null` implementation and make it `const`)
 - rust-lang#140712 (normalization: avoid incompletely constraining GAT args)
 - rust-lang#140768 (Improve `dangerous_implicit_aurorefs` diagnostic output)
 - rust-lang#140947 (Flush errors before deep normalize in `dropck_outlives`)
 - rust-lang#140990 (VxWorks: updates from recent libc versions)
 - rust-lang#141027 (remove `RustfmtState` to reduce `initial_rustfmt` complexity)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 8768188 into rust-lang:master May 16, 2025
6 checks passed
@rustbot rustbot added this to the 1.89.0 milestone May 16, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request May 16, 2025
Rollup merge of rust-lang#139749 - ruancomelli:docs/library/core/src/pin/fix-typo-necessarily-to-necessary, r=joboet

docs(library/core/src/pin): fix typo "necessarily" -> "necessary"

Fix a typo in [`library/core/src/pin.rs`](https://github.com/ruancomelli/rust/blob/14662fabeb69fe5ab6c6e68051bf9f80d4aaaa35/library/core/src/pin.rs), from

> As we'll see later, this is **necessarily** from the time the value is first pinned until the end of its lifespan.

to

> As we'll see later, this is **necessary** from the time the value is first pinned until the end of its lifespan.

(my emphasis).
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.

4 participants