]> git.lizzy.rs Git - rust.git/commitdiff
Remove `sys_common::util::abort`
authorChristiaan Dirkx <christiaan@dirkx.email>
Thu, 29 Apr 2021 13:59:05 +0000 (15:59 +0200)
committerChristiaan Dirkx <christiaan@dirkx.email>
Wed, 19 May 2021 13:01:50 +0000 (15:01 +0200)
library/std/src/sys_common/rt.rs
library/std/src/sys_common/util.rs

index 9ce6aa7c3696360b430f14a0004640fd8d18da38..e4c9b60594ef74a36352853531cbb5f7a658468f 100644 (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 {
index 9f7c3bd87952f31fcab40fa22d9034425df5d04e..b8cae26d04c5870db6b1dae948026bc676e2e45c 100644 (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!(