diff options
| author | bors <bors@rust-lang.org> | 2013-10-30 00:31:23 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-10-30 00:31:23 -0700 |
| commit | 5e1a69112584341522e2cc00bfc6dd1db6e0ec3a (patch) | |
| tree | bc856e4b2bd4ac269cbfe593c190cd77beaa1dbf /src/libstd/rt | |
| parent | e42e378f32e212997fc42281112b1c9c4c247de0 (diff) | |
| parent | 86a710e4545a383513c1247e48421142f3741984 (diff) | |
| download | rust-5e1a69112584341522e2cc00bfc6dd1db6e0ec3a.tar.gz rust-5e1a69112584341522e2cc00bfc6dd1db6e0ec3a.zip | |
auto merge of #9613 : jld/rust/enum-discrim-size.r0, r=alexcrichton
Allows an enum with a discriminant to use any of the primitive integer types to store it. By default the smallest usable type is chosen, but this can be overridden with an attribute: `#[repr(int)]` etc., or `#[repr(C)]` to match the target's C ABI for the equivalent C enum. Also adds a lint pass for using non-FFI safe enums in extern declarations, checks that specified discriminants can be stored in the specified type if any, and fixes assorted code that was assuming int.
Diffstat (limited to 'src/libstd/rt')
| -rw-r--r-- | src/libstd/rt/io/signal.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libstd/rt/io/signal.rs b/src/libstd/rt/io/signal.rs index 4c6c675df03..b782d713950 100644 --- a/src/libstd/rt/io/signal.rs +++ b/src/libstd/rt/io/signal.rs @@ -26,6 +26,7 @@ use result::{Err, Ok}; use rt::io::io_error; use rt::rtio::{IoFactory, RtioSignal, with_local_io}; +#[repr(int)] #[deriving(Eq, IterBytes)] pub enum Signum { /// Equivalent to SIGBREAK, delivered when the user presses Ctrl-Break. |
