From 5d546231a1b8a9b9673f223e613aed08023adf18 Mon Sep 17 00:00:00 2001 From: Kurdistan Tech Ministry Date: Thu, 23 Apr 2026 02:04:49 +0300 Subject: [PATCH] fix: guard extern crate alloc with not(feature="std") to prevent E0152 in std test builds --- serde_core/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/serde_core/src/lib.rs b/serde_core/src/lib.rs index 0d15c6ad..5ad57cdb 100644 --- a/serde_core/src/lib.rs +++ b/serde_core/src/lib.rs @@ -102,7 +102,7 @@ //////////////////////////////////////////////////////////////////////////////// -#[cfg(feature = "alloc")] +#[cfg(all(not(feature = "std"), feature = "alloc"))] extern crate alloc; // Explicitly import core crate for no_std targets (especially wasm32v1-none)