File tree 4 files changed +10
-12
lines changed
4 files changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -126,10 +126,6 @@ mod utf8;
126
126
127
127
pub use self :: ignored_any:: IgnoredAny ;
128
128
129
- #[ cfg( feature = "std" ) ]
130
- #[ doc( no_inline) ]
131
- pub use std:: error:: Error as StdError ;
132
- #[ cfg( not( feature = "std" ) ) ]
133
129
#[ doc( no_inline) ]
134
130
pub use std_error:: Error as StdError ;
135
131
Original file line number Diff line number Diff line change @@ -328,7 +328,6 @@ use self::__private as private;
328
328
#[ path = "de/seed.rs" ]
329
329
mod seed;
330
330
331
- #[ cfg( not( any( feature = "std" , feature = "unstable" ) ) ) ]
332
331
mod std_error;
333
332
334
333
// Re-export #[derive(Serialize, Deserialize)].
Original file line number Diff line number Diff line change @@ -115,13 +115,6 @@ mod impossible;
115
115
116
116
pub use self :: impossible:: Impossible ;
117
117
118
- #[ cfg( all( feature = "unstable" , not( feature = "std" ) ) ) ]
119
- #[ doc( inline) ]
120
- pub use core:: error:: Error as StdError ;
121
- #[ cfg( feature = "std" ) ]
122
- #[ doc( no_inline) ]
123
- pub use std:: error:: Error as StdError ;
124
- #[ cfg( not( any( feature = "std" , feature = "unstable" ) ) ) ]
125
118
#[ doc( no_inline) ]
126
119
pub use std_error:: Error as StdError ;
127
120
Original file line number Diff line number Diff line change
1
+ #[ cfg( not( any( feature = "std" , feature = "unstable" ) ) ) ]
1
2
use lib:: { Debug , Display } ;
2
3
4
+ #[ cfg( all( feature = "unstable" , not( feature = "std" ) ) ) ]
5
+ #[ doc( no_inline) ]
6
+ pub use core:: error:: Error ;
7
+
8
+ #[ cfg( feature = "std" ) ]
9
+ #[ doc( no_inline) ]
10
+ pub use std:: error:: Error ;
11
+
3
12
/// Either a re-export of std::error::Error or a new identical trait, depending
4
13
/// on whether Serde's "std" feature is enabled.
5
14
///
@@ -40,6 +49,7 @@ use lib::{Debug, Display};
40
49
/// ```edition2021
41
50
/// impl serde::ser::StdError for MySerError {}
42
51
/// ```
52
+ #[ cfg( not( any( feature = "std" , feature = "unstable" ) ) ) ]
43
53
pub trait Error : Debug + Display {
44
54
/// The underlying cause of this error, if any.
45
55
fn source ( & self ) -> Option < & ( Error + ' static ) > {
You can’t perform that action at this time.
0 commit comments