diff options
| author | Amanieu d'Antras <amanieu@gmail.com> | 2018-10-27 22:38:37 +0100 |
|---|---|---|
| committer | Amanieu d'Antras <amanieu@gmail.com> | 2018-11-06 17:21:13 +0000 |
| commit | 94f3ce9def8659e281b398c1582036f181d62f44 (patch) | |
| tree | 844cf1b9945607b48fcac0ce0cf999c96c283375 | |
| parent | 05812fa8c588473f03e3fa7cf59cd84f4f37c715 (diff) | |
| download | rust-94f3ce9def8659e281b398c1582036f181d62f44.tar.gz rust-94f3ce9def8659e281b398c1582036f181d62f44.zip | |
Add a comment about how Layout::extend matches the C struct layout
| -rw-r--r-- | src/libcore/alloc.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libcore/alloc.rs b/src/libcore/alloc.rs index 4efcaae59b0..bc2860a5a2f 100644 --- a/src/libcore/alloc.rs +++ b/src/libcore/alloc.rs @@ -248,6 +248,9 @@ impl Layout { /// will be properly aligned. Note that the result layout will /// satisfy the alignment properties of both `self` and `next`. /// + /// The resulting layout will be the same as that of a C struct containing + /// two fields with the layouts of `self` and `next`, in that order. + /// /// Returns `Some((k, offset))`, where `k` is layout of the concatenated /// record and `offset` is the relative location, in bytes, of the /// start of the `next` embedded within the concatenated record |
