From 6b9103a5ec25b5e7f2c337f5ba546fe420e25bdc Mon Sep 17 00:00:00 2001 From: elle Date: Sun, 7 Sep 2025 20:23:02 +0000 Subject: [PATCH] generic-rt: remove use of core instrinsics Fixes warning about not using compiler intrinsics. Calls into the `panic` macro instead of directly calling the `abort` intrinsic. Slightly changes the behavior of the function by printing the panic message, unwinding, and aborting. --- generic-rt/src/lib.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/generic-rt/src/lib.rs b/generic-rt/src/lib.rs index 394db7b9f8..9a69e042f0 100644 --- a/generic-rt/src/lib.rs +++ b/generic-rt/src/lib.rs @@ -1,5 +1,4 @@ #![no_std] -#![feature(core_intrinsics)] use core::{ arch::asm, @@ -92,10 +91,8 @@ impl GenericTcb { Some(&mut *Self::current_ptr()?) } } -pub fn panic_notls(_msg: impl core::fmt::Display) -> ! { - //eprintln!("panicked in ld.so: {}", msg); - - core::intrinsics::abort(); +pub fn panic_notls(msg: impl core::fmt::Display) -> ! { + panic!("panicked in ld.so: {msg}"); } pub trait ExpectTlsFree {