@@ -171,12 +171,13 @@ use core::task::{Context, Poll};
171
171
#[ cfg( not( no_global_oom_handling) ) ]
172
172
use crate :: alloc:: { handle_alloc_error, WriteCloneIntoRaw } ;
173
173
use crate :: alloc:: { AllocError , Allocator , Global , Layout } ;
174
- #[ cfg( any ( not( no_global_oom_handling) , not ( bootstrap ) ) ) ]
174
+ #[ cfg( not( no_global_oom_handling) ) ]
175
175
use crate :: borrow:: Cow ;
176
176
use crate :: raw_vec:: RawVec ;
177
177
#[ cfg( not( no_global_oom_handling) ) ]
178
178
use crate :: str:: from_boxed_utf8_unchecked;
179
179
#[ cfg( not( bootstrap) ) ]
180
+ #[ cfg( not( no_global_oom_handling) ) ]
180
181
use crate :: string:: String ;
181
182
#[ cfg( not( no_global_oom_handling) ) ]
182
183
use crate :: vec:: Vec ;
@@ -2139,6 +2140,7 @@ impl dyn Error + Send + Sync {
2139
2140
}
2140
2141
2141
2142
#[ cfg( not( bootstrap) ) ]
2143
+ #[ cfg( not( no_global_oom_handling) ) ]
2142
2144
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2143
2145
impl < ' a , E : Error + ' a > From < E > for Box < dyn Error + ' a > {
2144
2146
/// Converts a type of [`Error`] into a box of dyn [`Error`].
@@ -2172,6 +2174,7 @@ impl<'a, E: Error + 'a> From<E> for Box<dyn Error + 'a> {
2172
2174
}
2173
2175
2174
2176
#[ cfg( not( bootstrap) ) ]
2177
+ #[ cfg( not( no_global_oom_handling) ) ]
2175
2178
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2176
2179
impl < ' a , E : Error + Send + Sync + ' a > From < E > for Box < dyn Error + Send + Sync + ' a > {
2177
2180
/// Converts a type of [`Error`] + [`Send`] + [`Sync`] into a box of
@@ -2211,6 +2214,7 @@ impl<'a, E: Error + Send + Sync + 'a> From<E> for Box<dyn Error + Send + Sync +
2211
2214
}
2212
2215
2213
2216
#[ cfg( not( bootstrap) ) ]
2217
+ #[ cfg( not( no_global_oom_handling) ) ]
2214
2218
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2215
2219
impl From < String > for Box < dyn Error + Send + Sync > {
2216
2220
/// Converts a [`String`] into a box of dyn [`Error`] + [`Send`] + [`Sync`].
@@ -2255,6 +2259,7 @@ impl From<String> for Box<dyn Error + Send + Sync> {
2255
2259
}
2256
2260
2257
2261
#[ cfg( not( bootstrap) ) ]
2262
+ #[ cfg( not( no_global_oom_handling) ) ]
2258
2263
#[ stable( feature = "string_box_error" , since = "1.6.0" ) ]
2259
2264
impl From < String > for Box < dyn Error > {
2260
2265
/// Converts a [`String`] into a box of dyn [`Error`].
@@ -2277,6 +2282,7 @@ impl From<String> for Box<dyn Error> {
2277
2282
}
2278
2283
2279
2284
#[ cfg( not( bootstrap) ) ]
2285
+ #[ cfg( not( no_global_oom_handling) ) ]
2280
2286
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2281
2287
impl < ' a > From < & str > for Box < dyn Error + Send + Sync + ' a > {
2282
2288
/// Converts a [`str`] into a box of dyn [`Error`] + [`Send`] + [`Sync`].
@@ -2301,6 +2307,7 @@ impl<'a> From<&str> for Box<dyn Error + Send + Sync + 'a> {
2301
2307
}
2302
2308
2303
2309
#[ cfg( not( bootstrap) ) ]
2310
+ #[ cfg( not( no_global_oom_handling) ) ]
2304
2311
#[ stable( feature = "string_box_error" , since = "1.6.0" ) ]
2305
2312
impl From < & str > for Box < dyn Error > {
2306
2313
/// Converts a [`str`] into a box of dyn [`Error`].
@@ -2323,6 +2330,7 @@ impl From<&str> for Box<dyn Error> {
2323
2330
}
2324
2331
2325
2332
#[ cfg( not( bootstrap) ) ]
2333
+ #[ cfg( not( no_global_oom_handling) ) ]
2326
2334
#[ stable( feature = "cow_box_error" , since = "1.22.0" ) ]
2327
2335
impl < ' a , ' b > From < Cow < ' b , str > > for Box < dyn Error + Send + Sync + ' a > {
2328
2336
/// Converts a [`Cow`] into a box of dyn [`Error`] + [`Send`] + [`Sync`].
@@ -2345,6 +2353,7 @@ impl<'a, 'b> From<Cow<'b, str>> for Box<dyn Error + Send + Sync + 'a> {
2345
2353
}
2346
2354
2347
2355
#[ cfg( not( bootstrap) ) ]
2356
+ #[ cfg( not( no_global_oom_handling) ) ]
2348
2357
#[ stable( feature = "cow_box_error" , since = "1.22.0" ) ]
2349
2358
impl < ' a > From < Cow < ' a , str > > for Box < dyn Error > {
2350
2359
/// Converts a [`Cow`] into a box of dyn [`Error`].
0 commit comments