File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 212212//! As the author of a data structure you get to decide for each field whether pinning
213213//! "propagates" to this field or not. Pinning that propagates is also called "structural",
214214//! because it follows the structure of the type.
215- //! In the following, we describe the considerations that have to be made for either choice.
215+ //! In the following subsections, we describe the considerations that have to be made
216+ //! for either choice.
216217//!
217218//! ## Pinning *is not* structural for `field`
218219//!
221222//! nothing can go wrong! So, if you decide that some field does not have structural pinning,
222223//! all you have to ensure is that you never create a pinned reference to that field.
223224//!
224- //! Then you may add a projection method that turns `Pin<&mut Struct>` into `&mut Field`:
225+ //! Fields without structural pinning may have a projection method that turns
226+ //! `Pin<&mut Struct>` into `&mut Field`:
225227//! ```rust,no_run
226228//! # use std::pin::Pin;
227229//! # type Field = i32;
You can’t perform that action at this time.
0 commit comments