Skip to content

Commit b987f74

Browse files
committed
Remove sys_common::util::abort
1 parent 5b09085 commit b987f74

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

library/std/src/sys_common/rt.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,12 @@ macro_rules! rterr {
4848
}
4949

5050
macro_rules! rtabort {
51-
($($t:tt)*) => (crate::sys_common::util::abort(format_args!($($t)*)))
51+
($($t:tt)*) => {
52+
{
53+
rterr!("fatal runtime error: {}\n", format_args!($($t)*));
54+
crate::sys::abort_internal();
55+
}
56+
}
5257
}
5358

5459
macro_rules! rtassert {

library/std/src/sys_common/util.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,6 @@ pub fn dumb_print(args: fmt::Arguments<'_>) {
99
}
1010
}
1111

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

0 commit comments

Comments
 (0)