mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 15:54:15 +00:00
Remove sys_common::util::abort
This commit is contained in:
parent
5b0908587e
commit
b987f74f05
@ -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 {
|
||||
|
@ -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!(
|
||||
|
Loading…
Reference in New Issue
Block a user