@@ -486,16 +486,19 @@ mod tests {
486486 use std:: {
487487 convert:: Infallible ,
488488 sync:: {
489- atomic:: { AtomicU64 , Ordering } ,
489+ atomic:: Ordering ,
490490 Arc ,
491491 } ,
492492 } ;
493+ #[ cfg( target_has_atomic = "64" ) ]
494+ use std:: sync:: atomic:: AtomicU64 ;
493495 use tower:: { ServiceBuilder , ServiceExt } ;
494496
495497 #[ allow( unused_imports) ]
496498 use super :: * ;
497499
498500 #[ tokio:: test]
501+ #[ cfg( target_has_atomic = "64" ) ]
499502 async fn basic ( ) {
500503 let svc = ServiceBuilder :: new ( )
501504 . set_x_request_id ( Counter :: default ( ) )
@@ -526,6 +529,7 @@ mod tests {
526529 }
527530
528531 #[ tokio:: test]
532+ #[ cfg( target_has_atomic = "64" ) ]
529533 async fn other_middleware_setting_request_id ( ) {
530534 let svc = ServiceBuilder :: new ( )
531535 . override_request_header (
@@ -554,6 +558,7 @@ mod tests {
554558 }
555559
556560 #[ tokio:: test]
561+ #[ cfg( target_has_atomic = "64" ) ]
557562 async fn other_middleware_setting_request_id_on_response ( ) {
558563 let svc = ServiceBuilder :: new ( )
559564 . set_x_request_id ( Counter :: default ( ) )
@@ -574,8 +579,10 @@ mod tests {
574579 }
575580
576581 #[ derive( Clone , Default ) ]
582+ #[ cfg( target_has_atomic = "64" ) ]
577583 struct Counter ( Arc < AtomicU64 > ) ;
578584
585+ #[ cfg( target_has_atomic = "64" ) ]
579586 impl MakeRequestId for Counter {
580587 fn make_request_id < B > ( & mut self , _request : & Request < B > ) -> Option < RequestId > {
581588 let id =
0 commit comments