Skip to content

Commit

Permalink
Merge pull request #2541 from dtolnay/de-core-error
Browse files Browse the repository at this point in the history
Fix `serde::de::StdError` in no-std unstable build
  • Loading branch information
dtolnay authored Jul 28, 2023
2 parents 7b09ccc + ff5442c commit 8b3d71a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
5 changes: 4 additions & 1 deletion serde/src/de/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 8b3d71a

Please sign in to comment.