Skip to content

Commit 8b3d71a

Browse files
authored
Merge pull request #2541 from dtolnay/de-core-error
Fix `serde::de::StdError` in no-std unstable build
2 parents 7b09ccc + ff5442c commit 8b3d71a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.github/workflows/ci.yml

+1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ jobs:
6262
- run: cd serde && cargo build --no-default-features
6363
- run: cd serde && cargo build --no-default-features --features alloc
6464
- run: cd serde && cargo build --no-default-features --features rc,alloc
65+
- run: cd serde && cargo build --no-default-features --features unstable
6566
- run: cd serde && cargo test --features derive,rc,unstable
6667
- run: cd test_suite/no_std && cargo build
6768
if: matrix.os != 'windows'

serde/src/de/mod.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,13 @@ mod utf8;
126126

127127
pub use self::ignored_any::IgnoredAny;
128128

129+
#[cfg(all(feature = "unstable", not(feature = "std")))]
130+
#[doc(no_inline)]
131+
pub use core::error::Error as StdError;
129132
#[cfg(feature = "std")]
130133
#[doc(no_inline)]
131134
pub use std::error::Error as StdError;
132-
#[cfg(not(feature = "std"))]
135+
#[cfg(not(any(feature = "std", feature = "unstable")))]
133136
#[doc(no_inline)]
134137
pub use std_error::Error as StdError;
135138

0 commit comments

Comments
 (0)