diff options
| author | toddaaro <github@opprobrio.us> | 2013-06-10 15:29:02 -0700 |
|---|---|---|
| committer | toddaaro <github@opprobrio.us> | 2013-06-10 15:29:02 -0700 |
| commit | d64d26cd39a86a40feb0db7a9147cc2ae5e82994 (patch) | |
| tree | 00cedc9e9b752fa99dfb552b73fa9359cd86b7ce /src/libstd/macros.rs | |
| parent | d4de99aa6c53b0eb0d5be2ccfc62e2c89b2cd2df (diff) | |
| download | rust-d64d26cd39a86a40feb0db7a9147cc2ae5e82994.tar.gz rust-d64d26cd39a86a40feb0db7a9147cc2ae5e82994.zip | |
debugged a compiler ICE when merging local::borrow changes into the main io branch and modified the incoming new file lang.rs to be api-compatible
Diffstat (limited to 'src/libstd/macros.rs')
| -rw-r--r-- | src/libstd/macros.rs | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/src/libstd/macros.rs b/src/libstd/macros.rs index fda48b6ffb7..bf5b36c7580 100644 --- a/src/libstd/macros.rs +++ b/src/libstd/macros.rs @@ -38,16 +38,29 @@ macro_rules! rtassert ( } ) ) + +// The do_abort function was originally inside the abort macro, but +// this was ICEing the compiler so it has been moved outside. Now this +// seems to work? +pub fn do_abort() -> ! { + unsafe { ::libc::abort(); } +} + macro_rules! abort( ($( $msg:expr),+) => ( { rtdebug!($($msg),+); - do_abort(); +// do_abort(); + + // NB: This is in a fn to avoid putting the `unsafe` block in + // a macro, which causes spurious 'unnecessary unsafe block' + // warnings. +// fn do_abort() -> ! { +// unsafe { ::libc::abort(); } +// } + + ::macros::do_abort(); - // NB: This is in a fn to avoid putting the `unsafe` block in a macro, - // which causes spurious 'unnecessary unsafe block' warnings. - fn do_abort() -> ! { - unsafe { ::libc::abort(); } - } } ) ) + |
