From 92d686f9a536d4b3d3ede61e65d2f883a7bc4ed4 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Fri, 28 Jul 2023 15:58:57 -0700 Subject: [PATCH] Fix serde::de::StdError in no-std unstable build --- serde/src/de/mod.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/serde/src/de/mod.rs b/serde/src/de/mod.rs index a04ecf77d..b53206bdf 100644 --- a/serde/src/de/mod.rs +++ b/serde/src/de/mod.rs @@ -126,10 +126,13 @@ mod utf8; pub use self::ignored_any::IgnoredAny; +#[cfg(all(feature = "unstable", not(feature = "std")))] +#[doc(no_inline)] +pub use core::error::Error as StdError; #[cfg(feature = "std")] #[doc(no_inline)] pub use std::error::Error as StdError; -#[cfg(not(feature = "std"))] +#[cfg(not(any(feature = "std", feature = "unstable")))] #[doc(no_inline)] pub use std_error::Error as StdError;