Skip to content

Commit

Permalink
move of packed fields might or might not occur when they actually are…
Browse files Browse the repository at this point in the history
… sufficiently aligned
  • Loading branch information
RalfJung committed Aug 8, 2019
1 parent db7c773 commit e82b053
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libcore/pin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e82b053

Please sign in to comment.