about summary refs log tree commit diff
path: root/src/libcore/alloc/layout.rs
diff options
context:
space:
mode:
authorCAD97 <cad97@cad97.com>2020-04-17 18:59:36 -0400
committerCAD97 <cad97@cad97.com>2020-04-17 18:59:36 -0400
commita01b00faf877deab0ef3896ce655351398fe4a47 (patch)
tree6aa125740687e64d7aabb2515d238c044d3be716 /src/libcore/alloc/layout.rs
parent5f1fd9da5488cc2fe88dc89e5ca3f183526388a9 (diff)
downloadrust-a01b00faf877deab0ef3896ce655351398fe4a47.tar.gz
rust-a01b00faf877deab0ef3896ce655351398fe4a47.zip
Clarify layout information in Layout::extend
Diffstat (limited to 'src/libcore/alloc/layout.rs')
-rw-r--r--src/libcore/alloc/layout.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/libcore/alloc/layout.rs b/src/libcore/alloc/layout.rs
index be62671f59f..b2a109d1cd1 100644
--- a/src/libcore/alloc/layout.rs
+++ b/src/libcore/alloc/layout.rs
@@ -258,9 +258,11 @@ 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, 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.)
     ///
     /// Note that the resulting layout will satisfy the alignment properties
     /// of both `self` and `next`, in order to ensure alignment of both parts.