diff options
| author | bors <bors@rust-lang.org> | 2014-10-27 23:02:55 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-10-27 23:02:55 +0000 |
| commit | bd7138dd698dde29fb4d7fd34529a863b85d947e (patch) | |
| tree | b0d85f6266675501dce79b4802325e0d60b147e3 /src/libcore | |
| parent | e05c3b7799b45b78baf49f05763865be838f5b43 (diff) | |
| parent | 4dc06dceb2bbb7ced9ea137b5280f7ce413b4d01 (diff) | |
| download | rust-bd7138dd698dde29fb4d7fd34529a863b85d947e.tar.gz rust-bd7138dd698dde29fb4d7fd34529a863b85d947e.zip | |
auto merge of #18368 : alexcrichton/rust/rollup, r=alexcrichton
Diffstat (limited to 'src/libcore')
| -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 {} - |
