File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 212
212
//! As the author of a data structure you get to decide for each field whether pinning
213
213
//! "propagates" to this field or not. Pinning that propagates is also called "structural",
214
214
//! 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.
216
217
//!
217
218
//! ## Pinning *is not* structural for `field`
218
219
//!
221
222
//! nothing can go wrong! So, if you decide that some field does not have structural pinning,
222
223
//! all you have to ensure is that you never create a pinned reference to that field.
223
224
//!
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`:
225
227
//! ```rust,no_run
226
228
//! # use std::pin::Pin;
227
229
//! # type Field = i32;
You can’t perform that action at this time.
0 commit comments