File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -214,6 +214,12 @@ pub struct Custom {
214214 outer_drop : unsafe fn ( * mut Self ) ,
215215}
216216
217+ // SAFETY: All members of `Custom` are `Send`
218+ unsafe impl Send for Custom { }
219+
220+ // SAFETY: All members of `Custom` are `Sync`
221+ unsafe impl Sync for Custom { }
222+
217223impl fmt:: Debug for Custom {
218224 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
219225 f. debug_struct ( "Custom" ) . field ( "kind" , & self . kind ) . field ( "error" , self . error_ref ( ) ) . finish ( )
@@ -274,6 +280,12 @@ impl Custom {
274280#[ doc( hidden) ]
275281pub struct CustomOwner ( crate :: ptr:: NonNull < Custom > ) ;
276282
283+ // SAFETY: Custom is `Send`
284+ unsafe impl Send for CustomOwner { }
285+
286+ // SAFETY: Custom is `Sync`
287+ unsafe impl Sync for CustomOwner { }
288+
277289impl Drop for CustomOwner {
278290 fn drop ( & mut self ) {
279291 // SAFETY: `CustomOwner::from_raw` ensures this call is safe.
You can’t perform that action at this time.
0 commit comments