diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-05-15 22:28:49 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-15 22:28:49 +0200 |
| commit | 8768188533e16f3fc8fb9ab9d41098f89a472d11 (patch) | |
| tree | ab0f125774784ed9c5d4b200cb0516b2827ef08a | |
| parent | c4e05e53d19b550a358ee8b2e29ecd5a11075800 (diff) | |
| parent | 6f23f167af57af26543fa93f87a12f637e66c5e8 (diff) | |
| download | rust-8768188533e16f3fc8fb9ab9d41098f89a472d11.tar.gz rust-8768188533e16f3fc8fb9ab9d41098f89a472d11.zip | |
Rollup merge of #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).
| -rw-r--r-- | library/core/src/pin.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/library/core/src/pin.rs b/library/core/src/pin.rs index ecfa723722d..257424b355f 100644 --- a/library/core/src/pin.rs +++ b/library/core/src/pin.rs @@ -12,11 +12,11 @@ //! "pinned," in that it has been permanently (until the end of its lifespan) attached to its //! location in memory, as though pinned to a pinboard. Pinning a value is an incredibly useful //! building block for [`unsafe`] code to be able to reason about whether a raw pointer to the -//! pinned value is still valid. [As we'll see later][drop-guarantee], this is necessarily from the -//! time the value is first pinned until the end of its lifespan. This concept of "pinning" is -//! necessary to implement safe interfaces on top of things like self-referential types and -//! intrusive data structures which cannot currently be modeled in fully safe Rust using only -//! borrow-checked [references][reference]. +//! pinned value is still valid. [As we'll see later][drop-guarantee], once a value is pinned, +//! it is necessarily valid at its memory location until the end of its lifespan. This concept +//! of "pinning" is necessary to implement safe interfaces on top of things like self-referential +//! types and intrusive data structures which cannot currently be modeled in fully safe Rust using +//! only borrow-checked [references][reference]. //! //! "Pinning" allows us to put a *value* which exists at some location in memory into a state where //! safe code cannot *move* that value to a different location in memory or otherwise invalidate it |
