diff options
| author | Brian Anderson <banderson@mozilla.com> | 2013-06-17 23:22:41 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2013-06-17 23:22:41 -0700 |
| commit | 021e81fbd311d93c94cbd40524ff53062fd7fe6e (patch) | |
| tree | 1ae3fed6d921971ab1ad749facc175c61e8aa195 /src/libstd | |
| parent | 9ef4c413a869b4fc1e5df3f79f484b2ffd46cda0 (diff) | |
| download | rust-021e81fbd311d93c94cbd40524ff53062fd7fe6e.tar.gz rust-021e81fbd311d93c94cbd40524ff53062fd7fe6e.zip | |
std::rt: move abort function to util module
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/macros.rs | 10 | ||||
| -rw-r--r-- | src/libstd/rt/util.rs | 4 |
2 files changed, 5 insertions, 9 deletions
diff --git a/src/libstd/macros.rs b/src/libstd/macros.rs index 8d221fe6a1b..51da9344cab 100644 --- a/src/libstd/macros.rs +++ b/src/libstd/macros.rs @@ -39,18 +39,10 @@ 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? -#[allow(missing_doc)] -pub fn do_abort() -> ! { - unsafe { ::libc::abort(); } -} - macro_rules! abort( ($( $msg:expr),+) => ( { rtdebug!($($msg),+); - ::macros::do_abort(); + ::rt::util::abort(); } ) ) diff --git a/src/libstd/rt/util.rs b/src/libstd/rt/util.rs index 39b9de90f34..6153170ecaf 100644 --- a/src/libstd/rt/util.rs +++ b/src/libstd/rt/util.rs @@ -19,4 +19,8 @@ pub fn num_cpus() -> uint { extern { fn rust_get_num_cpus() -> libc::uintptr_t; } +} + +pub fn abort() -> ! { + unsafe { libc::abort(); } } \ No newline at end of file |
