@@ -171,12 +171,13 @@ use core::task::{Context, Poll};
171171#[ cfg( not( no_global_oom_handling) ) ]
172172use crate :: alloc:: { handle_alloc_error, WriteCloneIntoRaw } ;
173173use crate :: alloc:: { AllocError , Allocator , Global , Layout } ;
174- #[ cfg( any ( not( no_global_oom_handling) , not ( bootstrap ) ) ) ]
174+ #[ cfg( not( no_global_oom_handling) ) ]
175175use crate :: borrow:: Cow ;
176176use crate :: raw_vec:: RawVec ;
177177#[ cfg( not( no_global_oom_handling) ) ]
178178use crate :: str:: from_boxed_utf8_unchecked;
179179#[ cfg( not( bootstrap) ) ]
180+ #[ cfg( not( no_global_oom_handling) ) ]
180181use crate :: string:: String ;
181182#[ cfg( not( no_global_oom_handling) ) ]
182183use crate :: vec:: Vec ;
@@ -2139,6 +2140,7 @@ impl dyn Error + Send + Sync {
21392140}
21402141
21412142#[ cfg( not( bootstrap) ) ]
2143+ #[ cfg( not( no_global_oom_handling) ) ]
21422144#[ stable( feature = "rust1" , since = "1.0.0" ) ]
21432145impl < ' a , E : Error + ' a > From < E > for Box < dyn Error + ' a > {
21442146 /// 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> {
21722174}
21732175
21742176#[ cfg( not( bootstrap) ) ]
2177+ #[ cfg( not( no_global_oom_handling) ) ]
21752178#[ stable( feature = "rust1" , since = "1.0.0" ) ]
21762179impl < ' a , E : Error + Send + Sync + ' a > From < E > for Box < dyn Error + Send + Sync + ' a > {
21772180 /// 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 +
22112214}
22122215
22132216#[ cfg( not( bootstrap) ) ]
2217+ #[ cfg( not( no_global_oom_handling) ) ]
22142218#[ stable( feature = "rust1" , since = "1.0.0" ) ]
22152219impl From < String > for Box < dyn Error + Send + Sync > {
22162220 /// Converts a [`String`] into a box of dyn [`Error`] + [`Send`] + [`Sync`].
@@ -2255,6 +2259,7 @@ impl From<String> for Box<dyn Error + Send + Sync> {
22552259}
22562260
22572261#[ cfg( not( bootstrap) ) ]
2262+ #[ cfg( not( no_global_oom_handling) ) ]
22582263#[ stable( feature = "string_box_error" , since = "1.6.0" ) ]
22592264impl From < String > for Box < dyn Error > {
22602265 /// Converts a [`String`] into a box of dyn [`Error`].
@@ -2277,6 +2282,7 @@ impl From<String> for Box<dyn Error> {
22772282}
22782283
22792284#[ cfg( not( bootstrap) ) ]
2285+ #[ cfg( not( no_global_oom_handling) ) ]
22802286#[ stable( feature = "rust1" , since = "1.0.0" ) ]
22812287impl < ' a > From < & str > for Box < dyn Error + Send + Sync + ' a > {
22822288 /// 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> {
23012307}
23022308
23032309#[ cfg( not( bootstrap) ) ]
2310+ #[ cfg( not( no_global_oom_handling) ) ]
23042311#[ stable( feature = "string_box_error" , since = "1.6.0" ) ]
23052312impl From < & str > for Box < dyn Error > {
23062313 /// Converts a [`str`] into a box of dyn [`Error`].
@@ -2323,6 +2330,7 @@ impl From<&str> for Box<dyn Error> {
23232330}
23242331
23252332#[ cfg( not( bootstrap) ) ]
2333+ #[ cfg( not( no_global_oom_handling) ) ]
23262334#[ stable( feature = "cow_box_error" , since = "1.22.0" ) ]
23272335impl < ' a , ' b > From < Cow < ' b , str > > for Box < dyn Error + Send + Sync + ' a > {
23282336 /// 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> {
23452353}
23462354
23472355#[ cfg( not( bootstrap) ) ]
2356+ #[ cfg( not( no_global_oom_handling) ) ]
23482357#[ stable( feature = "cow_box_error" , since = "1.22.0" ) ]
23492358impl < ' a > From < Cow < ' a , str > > for Box < dyn Error > {
23502359 /// Converts a [`Cow`] into a box of dyn [`Error`].
0 commit comments