File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 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 necessarily 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
You can’t perform that action at this time.
0 commit comments