Merge pull request #2541 from dtolnay/de-core-error

Fix `serde:🇩🇪:StdError` in no-std unstable build
This commit is contained in:
David Tolnay 2023-07-28 16:05:14 -07:00 committed by GitHub
commit 8b3d71ae2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -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'

View File

@ -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;