diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6652aad73..d67039ce3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -62,6 +62,7 @@ jobs: - run: cd serde && cargo build --no-default-features - run: cd serde && cargo build --no-default-features --features alloc - run: cd serde && cargo build --no-default-features --features rc,alloc + - run: cd serde && cargo build --no-default-features --features unstable - run: cd serde && cargo test --features derive,rc,unstable - run: cd test_suite/no_std && cargo build if: matrix.os != 'windows' 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;