Remove sys_common::util::abort

This commit is contained in:
Christiaan Dirkx 2021-04-29 15:59:05 +02:00
parent 5b0908587e
commit b987f74f05
2 changed files with 6 additions and 11 deletions

View File

@ -48,7 +48,12 @@ macro_rules! rterr {
}
macro_rules! rtabort {
($($t:tt)*) => (crate::sys_common::util::abort(format_args!($($t)*)))
($($t:tt)*) => {
{
rterr!("fatal runtime error: {}\n", format_args!($($t)*));
crate::sys::abort_internal();
}
}
}
macro_rules! rtassert {

View File

@ -9,16 +9,6 @@ pub fn dumb_print(args: fmt::Arguments<'_>) {
}
}
// Other platforms should use the appropriate platform-specific mechanism for
// aborting the process. If no platform-specific mechanism is available,
// crate::intrinsics::abort() may be used instead. The above implementations cover
// all targets currently supported by libstd.
pub fn abort(args: fmt::Arguments<'_>) -> ! {
dumb_print(format_args!("fatal runtime error: {}\n", args));
crate::sys::abort_internal();
}
#[allow(dead_code)] // stack overflow detection not enabled on all platforms
pub unsafe fn report_overflow() {
dumb_print(format_args!(