Remove sys_common::util::abort
This commit is contained in:
parent
5b0908587e
commit
b987f74f05
2 changed files with 6 additions and 11 deletions
|
@ -48,7 +48,12 @@ macro_rules! rterr {
|
||||||
}
|
}
|
||||||
|
|
||||||
macro_rules! rtabort {
|
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 {
|
macro_rules! rtassert {
|
||||||
|
|
|
@ -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
|
#[allow(dead_code)] // stack overflow detection not enabled on all platforms
|
||||||
pub unsafe fn report_overflow() {
|
pub unsafe fn report_overflow() {
|
||||||
dumb_print(format_args!(
|
dumb_print(format_args!(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue