Commit 785c2d9 1 parent d549f04 commit 785c2d9 Copy full SHA for 785c2d9
File tree 4 files changed +12
-5
lines changed
4 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ fn main() {
15
15
16
16
if minor >= 77 {
17
17
println ! ( "cargo:rustc-check-cfg=cfg(no_core_cstr)" ) ;
18
+ println ! ( "cargo:rustc-check-cfg=cfg(no_core_error)" ) ;
18
19
println ! ( "cargo:rustc-check-cfg=cfg(no_core_net)" ) ;
19
20
println ! ( "cargo:rustc-check-cfg=cfg(no_core_num_saturating)" ) ;
20
21
println ! ( "cargo:rustc-check-cfg=cfg(no_core_try_from)" ) ;
@@ -98,6 +99,12 @@ fn main() {
98
99
if minor < 78 {
99
100
println ! ( "cargo:rustc-cfg=no_diagnostic_namespace" ) ;
100
101
}
102
+
103
+ // The Error trait became available in core in 1.81.
104
+ // https://blog.rust-lang.org/2024/09/05/Rust-1.81.0.html#coreerrorerror
105
+ if minor < 81 {
106
+ println ! ( "cargo:rustc-cfg=no_core_error" ) ;
107
+ }
101
108
}
102
109
103
110
fn rustc_minor_version ( ) -> Option < u32 > {
Original file line number Diff line number Diff line change @@ -124,10 +124,10 @@ pub(crate) mod size_hint;
124
124
125
125
pub use self :: ignored_any:: IgnoredAny ;
126
126
127
- #[ cfg( not( any ( feature = "std" , feature = "unstable" ) ) ) ]
127
+ #[ cfg( all ( not( feature = "std" ) , no_core_error ) ) ]
128
128
#[ doc( no_inline) ]
129
129
pub use crate :: std_error:: Error as StdError ;
130
- #[ cfg( all ( feature = "unstable" , not( feature = "std" ) ) ) ]
130
+ #[ cfg( not( any ( feature = "std" , no_core_error ) ) ) ]
131
131
#[ doc( no_inline) ]
132
132
pub use core:: error:: Error as StdError ;
133
133
#[ cfg( feature = "std" ) ]
Original file line number Diff line number Diff line change @@ -325,7 +325,7 @@ pub mod __private;
325
325
#[ path = "de/seed.rs" ]
326
326
mod seed;
327
327
328
- #[ cfg( not( any ( feature = "std" , feature = "unstable" ) ) ) ]
328
+ #[ cfg( all ( not( feature = "std" ) , no_core_error ) ) ]
329
329
mod std_error;
330
330
331
331
// Re-export #[derive(Serialize, Deserialize)].
Original file line number Diff line number Diff line change @@ -115,10 +115,10 @@ mod impossible;
115
115
116
116
pub use self :: impossible:: Impossible ;
117
117
118
- #[ cfg( not( any ( feature = "std" , feature = "unstable" ) ) ) ]
118
+ #[ cfg( all ( not( feature = "std" ) , no_core_error ) ) ]
119
119
#[ doc( no_inline) ]
120
120
pub use crate :: std_error:: Error as StdError ;
121
- #[ cfg( all ( feature = "unstable" , not( feature = "std" ) ) ) ]
121
+ #[ cfg( not( any ( feature = "std" , no_core_error ) ) ) ]
122
122
#[ doc( no_inline) ]
123
123
pub use core:: error:: Error as StdError ;
124
124
#[ cfg( feature = "std" ) ]
You can’t perform that action at this time.
0 commit comments