]> git.lizzy.rs Git - rust.git/blobdiff - src/libcore/pin.rs
move of packed fields might or might not occur when they actually are sufficiently...
[rust.git] / src / libcore / pin.rs
index 88a56174629f9ed2846008708ba0d07f39b36970..251dc4c3b99b71775fbc63171665bb714f7d0ea4 100644 (file)
 //! you do not accidentally use `self`/`this` in a way that is in conflict with pinning.
 //!
 //! Moreover, if your type is `#[repr(packed)]`, the compiler will automatically
-//! move fields around to be able to drop them. As a consequence, you cannot use
+//! move fields around to be able to drop them. In a packed struct, it might even do
+//! that for fields that happen to be sufficiently aligned. As a consequence, you cannot use
 //! pinning with a `#[repr(packed)]` type.
 //!
 //! # Projections and Structural Pinning