From a8b1dd13f375e73a112a693ef546bc7c00215236 Mon Sep 17 00:00:00 2001 From: Anton Kaliaev Date: Mon, 30 Jun 2025 16:54:25 +0500 Subject: [PATCH 1/2] fix(tools/no-std-check): mark no_mangle as unsafe fixes: ``` error: `#[no_mangle]` cannot be used on internal language items --> src/lib.rs:47:1 | 47 | #[no_mangle] | ^^^^^^^^^^^^ 48 | fn panic(_info: &PanicInfo) -> ! { | -------------------------------- should be the internal language item | = note: Rustc requires this item to have a specific mangled name. = note: If you are trying to prevent mangling to ease debugging, many = note: debuggers support a command such as `rbreak rust_begin_unwind` to = note: match `.*rust_begin_unwind.*` instead of `break rust_begin_unwind` on a specific name error: could not compile `no-std-check` (lib) due to 1 previous error ``` --- tools/no-std-check/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/no-std-check/src/lib.rs b/tools/no-std-check/src/lib.rs index 54faa390..74b32d63 100644 --- a/tools/no-std-check/src/lib.rs +++ b/tools/no-std-check/src/lib.rs @@ -44,7 +44,7 @@ error[E0152]: found duplicate lang item `panic_impl` */ #[cfg(feature = "panic-handler")] #[panic_handler] -#[no_mangle] +#[unsafe(no_mangle)] fn panic(_info: &PanicInfo) -> ! { loop {} } From c93867335b97c0c3c3560699dae686145637f0de Mon Sep 17 00:00:00 2001 From: Anton Kaliaev Date: Mon, 30 Jun 2025 17:09:32 +0500 Subject: [PATCH 2/2] drop no_mangle --- tools/no-std-check/src/lib.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/no-std-check/src/lib.rs b/tools/no-std-check/src/lib.rs index 74b32d63..4b734401 100644 --- a/tools/no-std-check/src/lib.rs +++ b/tools/no-std-check/src/lib.rs @@ -44,7 +44,6 @@ error[E0152]: found duplicate lang item `panic_impl` */ #[cfg(feature = "panic-handler")] #[panic_handler] -#[unsafe(no_mangle)] fn panic(_info: &PanicInfo) -> ! { loop {} }