std::rt: move abort function to util module
This commit is contained in:
parent
9ef4c413a8
commit
021e81fbd3
2 changed files with 5 additions and 9 deletions
|
|
@ -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();
|
||||
} )
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -19,4 +19,8 @@ pub fn num_cpus() -> uint {
|
|||
extern {
|
||||
fn rust_get_num_cpus() -> libc::uintptr_t;
|
||||
}
|
||||
}
|
||||
|
||||
pub fn abort() -> ! {
|
||||
unsafe { libc::abort(); }
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue