Skip to content

Commit

Permalink
Improve Layout::extend docs
Browse files Browse the repository at this point in the history
  • Loading branch information
CAD97 committed Apr 20, 2020
1 parent 9c3adaf commit 98f0a82
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/libcore/alloc/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,9 +258,10 @@ impl Layout {

/// Creates a layout describing the record for `self` followed by
/// `next`, including any necessary padding to ensure that `next`
/// will be properly aligned, but *no trailing padding*. In order
/// to match C representation layout `repr(C)`, you should call
/// `pad_to_align` after extending the layout with all fields.
/// will be properly aligned, but *no trailing padding*.
///
/// In order to match C representation layout `repr(C)`, you should
/// call `pad_to_align` after extending the layout with all fields.
/// (There is no way to match the default Rust representation
/// layout `repr(Rust)`, as it is unspecified.)
///
Expand Down

0 comments on commit 98f0a82

Please sign in to comment.