diff options
| author | Ralf Jung <post@ralfj.de> | 2019-08-08 10:01:41 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2019-08-08 10:01:41 +0200 |
| commit | e82b053f56d11c944c227cefa6d2c2689346d49e (patch) | |
| tree | 4e058972fbd69914ca0e73997ee19b1d01c177bc | |
| parent | db7c773a6be2f050d1d1504763819ea3916f5428 (diff) | |
| download | rust-e82b053f56d11c944c227cefa6d2c2689346d49e.tar.gz rust-e82b053f56d11c944c227cefa6d2c2689346d49e.zip | |
move of packed fields might or might not occur when they actually are sufficiently aligned
| -rw-r--r-- | src/libcore/pin.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libcore/pin.rs b/src/libcore/pin.rs index 88a56174629..251dc4c3b99 100644 --- a/src/libcore/pin.rs +++ b/src/libcore/pin.rs @@ -188,7 +188,8 @@ //! 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 |
