From: CAD97 Date: Mon, 20 Apr 2020 16:30:35 +0000 (-0400) Subject: Improve Layout::extend docs X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=98f0a8241b621b28ac58c7a5e80de4ead13ab0bb;p=rust.git Improve Layout::extend docs --- diff --git a/src/libcore/alloc/layout.rs b/src/libcore/alloc/layout.rs index 3881f0685d4..6200cd24266 100644 --- a/src/libcore/alloc/layout.rs +++ b/src/libcore/alloc/layout.rs @@ -258,9 +258,10 @@ pub fn repeat(&self, n: usize) -> Result<(Self, usize), LayoutErr> { /// 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.) ///