Skip to content

Commit 6f23f16

Browse files
committed
docs(library/core/src/pin): rewrite for clarity
1 parent 14662fa commit 6f23f16

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

library/core/src/pin.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
//! "pinned," in that it has been permanently (until the end of its lifespan) attached to its
1313
//! location in memory, as though pinned to a pinboard. Pinning a value is an incredibly useful
1414
//! building block for [`unsafe`] code to be able to reason about whether a raw pointer to the
15-
//! pinned value is still valid. [As we'll see later][drop-guarantee], this is necessary from the
16-
//! time the value is first pinned until the end of its lifespan. This concept of "pinning" is
17-
//! necessary to implement safe interfaces on top of things like self-referential types and
18-
//! intrusive data structures which cannot currently be modeled in fully safe Rust using only
19-
//! borrow-checked [references][reference].
15+
//! pinned value is still valid. [As we'll see later][drop-guarantee], once a value is pinned,
16+
//! it is necessarily valid at its memory location until the end of its lifespan. This concept
17+
//! of "pinning" is necessary to implement safe interfaces on top of things like self-referential
18+
//! types and intrusive data structures which cannot currently be modeled in fully safe Rust using
19+
//! only borrow-checked [references][reference].
2020
//!
2121
//! "Pinning" allows us to put a *value* which exists at some location in memory into a state where
2222
//! safe code cannot *move* that value to a different location in memory or otherwise invalidate it

0 commit comments

Comments
 (0)