@@ -669,22 +669,27 @@ mod tests {
669669 Step :: forward_checked( VirtAddr ( 0xffff_ffff_ffff_ffff ) , 1 ) ,
670670 None
671671 ) ;
672+ #[ cfg( target_pointer_width = "64" ) ]
672673 assert_eq ! (
673674 Step :: forward( VirtAddr ( 0x7fff_ffff_ffff ) , 0x1234_5678_9abd ) ,
674675 VirtAddr ( 0xffff_9234_5678_9abc )
675676 ) ;
677+ #[ cfg( target_pointer_width = "64" ) ]
676678 assert_eq ! (
677679 Step :: forward( VirtAddr ( 0x7fff_ffff_ffff ) , 0x8000_0000_0000 ) ,
678680 VirtAddr ( 0xffff_ffff_ffff_ffff )
679681 ) ;
682+ #[ cfg( target_pointer_width = "64" ) ]
680683 assert_eq ! (
681684 Step :: forward( VirtAddr ( 0x7fff_ffff_ff00 ) , 0x8000_0000_00ff ) ,
682685 VirtAddr ( 0xffff_ffff_ffff_ffff )
683686 ) ;
687+ #[ cfg( target_pointer_width = "64" ) ]
684688 assert_eq ! (
685689 Step :: forward_checked( VirtAddr ( 0x7fff_ffff_ff00 ) , 0x8000_0000_0100 ) ,
686690 None
687691 ) ;
692+ #[ cfg( target_pointer_width = "64" ) ]
688693 assert_eq ! (
689694 Step :: forward_checked( VirtAddr ( 0x7fff_ffff_ffff ) , 0x8000_0000_0001 ) ,
690695 None
@@ -705,18 +710,22 @@ mod tests {
705710 Step :: backward( VirtAddr ( 0xffff_8000_0000_0001 ) , 1 ) ,
706711 VirtAddr ( 0xffff_8000_0000_0000 )
707712 ) ;
713+ #[ cfg( target_pointer_width = "64" ) ]
708714 assert_eq ! (
709715 Step :: backward( VirtAddr ( 0xffff_9234_5678_9abc ) , 0x1234_5678_9abd ) ,
710716 VirtAddr ( 0x7fff_ffff_ffff )
711717 ) ;
718+ #[ cfg( target_pointer_width = "64" ) ]
712719 assert_eq ! (
713720 Step :: backward( VirtAddr ( 0xffff_8000_0000_0000 ) , 0x8000_0000_0000 ) ,
714721 VirtAddr ( 0 )
715722 ) ;
723+ #[ cfg( target_pointer_width = "64" ) ]
716724 assert_eq ! (
717725 Step :: backward( VirtAddr ( 0xffff_8000_0000_0000 ) , 0x7fff_ffff_ff01 ) ,
718726 VirtAddr ( 0xff )
719727 ) ;
728+ #[ cfg( target_pointer_width = "64" ) ]
720729 assert_eq ! (
721730 Step :: backward_checked( VirtAddr ( 0xffff_8000_0000_0000 ) , 0x8000_0000_0001 ) ,
722731 None
@@ -820,6 +829,7 @@ mod tests {
820829 }
821830
822831 #[ test]
832+ #[ cfg( target_pointer_width = "64" ) ]
823833 fn test_from_ptr_array ( ) {
824834 let slice = & [ 1 , 2 , 3 , 4 , 5 ] ;
825835 // Make sure that from_ptr(slice) is the address of the first element
0 commit comments