@@ -157,6 +157,7 @@ impl Error {
157157 object_ref : object_ref :: < E > ,
158158 #[ cfg( anyhow_no_ptr_addr_of) ]
159159 object_mut : object_mut :: < E > ,
160+ #[ cfg( any( feature = "std" , not( anyhow_no_core_error) ) ) ]
160161 object_boxed : object_boxed :: < E > ,
161162 object_downcast : object_downcast :: < E > ,
162163 #[ cfg( anyhow_no_ptr_addr_of) ]
@@ -185,6 +186,7 @@ impl Error {
185186 object_ref : object_ref :: < MessageError < M > > ,
186187 #[ cfg( all( any( feature = "std" , not( anyhow_no_core_error) ) , anyhow_no_ptr_addr_of) ) ]
187188 object_mut : object_mut :: < MessageError < M > > ,
189+ #[ cfg( any( feature = "std" , not( anyhow_no_core_error) ) ) ]
188190 object_boxed : object_boxed :: < MessageError < M > > ,
189191 object_downcast : object_downcast :: < M > ,
190192 #[ cfg( anyhow_no_ptr_addr_of) ]
@@ -214,6 +216,7 @@ impl Error {
214216 object_ref : object_ref :: < DisplayError < M > > ,
215217 #[ cfg( all( any( feature = "std" , not( anyhow_no_core_error) ) , anyhow_no_ptr_addr_of) ) ]
216218 object_mut : object_mut :: < DisplayError < M > > ,
219+ #[ cfg( any( feature = "std" , not( anyhow_no_core_error) ) ) ]
217220 object_boxed : object_boxed :: < DisplayError < M > > ,
218221 object_downcast : object_downcast :: < M > ,
219222 #[ cfg( anyhow_no_ptr_addr_of) ]
@@ -249,6 +252,7 @@ impl Error {
249252 object_ref : object_ref :: < ContextError < C , E > > ,
250253 #[ cfg( anyhow_no_ptr_addr_of) ]
251254 object_mut : object_mut :: < ContextError < C , E > > ,
255+ #[ cfg( any( feature = "std" , not( anyhow_no_core_error) ) ) ]
252256 object_boxed : object_boxed :: < ContextError < C , E > > ,
253257 object_downcast : context_downcast :: < C , E > ,
254258 #[ cfg( anyhow_no_ptr_addr_of) ]
@@ -278,6 +282,7 @@ impl Error {
278282 object_ref : object_ref :: < BoxedError > ,
279283 #[ cfg( anyhow_no_ptr_addr_of) ]
280284 object_mut : object_mut :: < BoxedError > ,
285+ #[ cfg( any( feature = "std" , not( anyhow_no_core_error) ) ) ]
281286 object_boxed : object_boxed :: < BoxedError > ,
282287 object_downcast : object_downcast :: < Box < dyn StdError + Send + Sync > > ,
283288 #[ cfg( anyhow_no_ptr_addr_of) ]
@@ -394,6 +399,7 @@ impl Error {
394399 object_ref : object_ref :: < ContextError < C , Error > > ,
395400 #[ cfg( all( any( feature = "std" , not( anyhow_no_core_error) ) , anyhow_no_ptr_addr_of) ) ]
396401 object_mut : object_mut :: < ContextError < C , Error > > ,
402+ #[ cfg( any( feature = "std" , not( anyhow_no_core_error) ) ) ]
397403 object_boxed : object_boxed :: < ContextError < C , Error > > ,
398404 object_downcast : context_chain_downcast :: < C > ,
399405 #[ cfg( anyhow_no_ptr_addr_of) ]
@@ -674,6 +680,7 @@ struct ErrorVTable {
674680 object_ref : unsafe fn ( Ref < ErrorImpl > ) -> Ref < dyn StdError + Send + Sync + ' static > ,
675681 #[ cfg( all( any( feature = "std" , not( anyhow_no_core_error) ) , anyhow_no_ptr_addr_of) ) ]
676682 object_mut : unsafe fn ( Mut < ErrorImpl > ) -> & mut ( dyn StdError + Send + Sync + ' static ) ,
683+ #[ cfg( any( feature = "std" , not( anyhow_no_core_error) ) ) ]
677684 object_boxed : unsafe fn ( Own < ErrorImpl > ) -> Box < dyn StdError + Send + Sync + ' static > ,
678685 object_downcast : unsafe fn ( Ref < ErrorImpl > , TypeId ) -> Option < Ref < ( ) > > ,
679686 #[ cfg( anyhow_no_ptr_addr_of) ]
@@ -735,6 +742,7 @@ where
735742}
736743
737744// Safety: requires layout of *e to match ErrorImpl<E>.
745+ #[ cfg( any( feature = "std" , not( anyhow_no_core_error) ) ) ]
738746unsafe fn object_boxed < E > ( e : Own < ErrorImpl > ) -> Box < dyn StdError + Send + Sync + ' static >
739747where
740748 E : StdError + Send + Sync + ' static ,
@@ -1048,6 +1056,7 @@ where
10481056 }
10491057}
10501058
1059+ #[ cfg( any( feature = "std" , not( anyhow_no_core_error) ) ) ]
10511060impl From < Error > for Box < dyn StdError + Send + Sync + ' static > {
10521061 #[ cold]
10531062 fn from ( error : Error ) -> Self {
@@ -1060,12 +1069,14 @@ impl From<Error> for Box<dyn StdError + Send + Sync + 'static> {
10601069 }
10611070}
10621071
1072+ #[ cfg( any( feature = "std" , not( anyhow_no_core_error) ) ) ]
10631073impl From < Error > for Box < dyn StdError + Send + ' static > {
10641074 fn from ( error : Error ) -> Self {
10651075 Box :: < dyn StdError + Send + Sync > :: from ( error)
10661076 }
10671077}
10681078
1079+ #[ cfg( any( feature = "std" , not( anyhow_no_core_error) ) ) ]
10691080impl From < Error > for Box < dyn StdError + ' static > {
10701081 fn from ( error : Error ) -> Self {
10711082 Box :: < dyn StdError + Send + Sync > :: from ( error)
0 commit comments