diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-10-27 09:07:29 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-10-27 15:12:29 -0700 |
| commit | 9dc9eccf3d681ce898bfb407bb5430c6d4de5982 (patch) | |
| tree | 79c10cf9cddf8863faf68c73294166d1358097db | |
| parent | abfc2f3b8d9429bb9fe3c0dba296110022e52d83 (diff) | |
| parent | 3942ab92f08db0f62aabdb1fb9a9f05ad34cc56d (diff) | |
| download | rust-9dc9eccf3d681ce898bfb407bb5430c6d4de5982.tar.gz rust-9dc9eccf3d681ce898bfb407bb5430c6d4de5982.zip | |
rollup merge of #18316 : thestinger/raw
| -rw-r--r-- | src/libcore/raw.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libcore/raw.rs b/src/libcore/raw.rs index a62e2ecdca0..fe365b43ca6 100644 --- a/src/libcore/raw.rs +++ b/src/libcore/raw.rs @@ -21,18 +21,21 @@ use mem; /// The representation of a Rust slice +#[repr(C)] pub struct Slice<T> { pub data: *const T, pub len: uint, } /// The representation of a Rust closure +#[repr(C)] pub struct Closure { pub code: *mut (), pub env: *mut (), } /// The representation of a Rust procedure (`proc()`) +#[repr(C)] pub struct Procedure { pub code: *mut (), pub env: *mut (), @@ -42,6 +45,7 @@ pub struct Procedure { /// /// This struct does not have a `Repr` implementation /// because there is no way to refer to all trait objects generically. +#[repr(C)] pub struct TraitObject { pub data: *mut (), pub vtable: *mut (), @@ -60,4 +64,3 @@ pub trait Repr<T> { impl<'a, T> Repr<Slice<T>> for &'a [T] {} impl<'a> Repr<Slice<u8>> for &'a str {} - |
