@@ -584,6 +584,7 @@ impl u8 {
584
584
#[ stable( feature = "ascii_methods_on_intrinsics" , since = "1.23.0" ) ]
585
585
#[ rustc_const_stable( feature = "const_ascii_methods_on_intrinsics" , since = "1.52.0" ) ]
586
586
#[ inline]
587
+ #[ allow( clippy:: manual_ignore_case_cmp) ] // exempt by being the one true definition
587
588
pub const fn eq_ignore_ascii_case ( & self , other : & u8 ) -> bool {
588
589
self . to_ascii_lowercase ( ) == other. to_ascii_lowercase ( )
589
590
}
@@ -671,6 +672,7 @@ impl u8 {
671
672
#[ must_use]
672
673
#[ stable( feature = "ascii_ctype_on_intrinsics" , since = "1.24.0" ) ]
673
674
#[ rustc_const_stable( feature = "const_ascii_ctype_on_intrinsics" , since = "1.47.0" ) ]
675
+ #[ allow( clippy:: manual_is_ascii_check) ] // exempt by being the one true definition
674
676
#[ inline]
675
677
pub const fn is_ascii_alphabetic ( & self ) -> bool {
676
678
matches ! ( * self , b'A' ..=b'Z' | b'a' ..=b'z' )
@@ -705,6 +707,7 @@ impl u8 {
705
707
#[ must_use]
706
708
#[ stable( feature = "ascii_ctype_on_intrinsics" , since = "1.24.0" ) ]
707
709
#[ rustc_const_stable( feature = "const_ascii_ctype_on_intrinsics" , since = "1.47.0" ) ]
710
+ #[ allow( clippy:: manual_is_ascii_check) ] // exempt by being the one true definition
708
711
#[ inline]
709
712
pub const fn is_ascii_uppercase ( & self ) -> bool {
710
713
matches ! ( * self , b'A' ..=b'Z' )
@@ -739,6 +742,7 @@ impl u8 {
739
742
#[ must_use]
740
743
#[ stable( feature = "ascii_ctype_on_intrinsics" , since = "1.24.0" ) ]
741
744
#[ rustc_const_stable( feature = "const_ascii_ctype_on_intrinsics" , since = "1.47.0" ) ]
745
+ #[ allow( clippy:: manual_is_ascii_check) ] // exempt by being the one true definition
742
746
#[ inline]
743
747
pub const fn is_ascii_lowercase ( & self ) -> bool {
744
748
matches ! ( * self , b'a' ..=b'z' )
@@ -776,9 +780,10 @@ impl u8 {
776
780
#[ must_use]
777
781
#[ stable( feature = "ascii_ctype_on_intrinsics" , since = "1.24.0" ) ]
778
782
#[ rustc_const_stable( feature = "const_ascii_ctype_on_intrinsics" , since = "1.47.0" ) ]
783
+ #[ allow( clippy:: manual_is_ascii_check) ] // exempt by being the one true definition
779
784
#[ inline]
780
785
pub const fn is_ascii_alphanumeric ( & self ) -> bool {
781
- matches ! ( * self , b'0' ..=b'9' ) | matches ! ( * self , b'A' ..=b'Z' ) | matches ! ( * self , b'a' ..=b'z' )
786
+ matches ! ( * self , b'0' ..=b'9' | b'A' ..=b'Z' | b'a' ..=b'z' )
782
787
}
783
788
784
789
/// Checks if the value is an ASCII decimal digit:
@@ -810,6 +815,7 @@ impl u8 {
810
815
#[ must_use]
811
816
#[ stable( feature = "ascii_ctype_on_intrinsics" , since = "1.24.0" ) ]
812
817
#[ rustc_const_stable( feature = "const_ascii_ctype_on_intrinsics" , since = "1.47.0" ) ]
818
+ #[ allow( clippy:: manual_is_ascii_check) ] // exempt by being the one true definition
813
819
#[ inline]
814
820
pub const fn is_ascii_digit ( & self ) -> bool {
815
821
matches ! ( * self , b'0' ..=b'9' )
@@ -841,6 +847,7 @@ impl u8 {
841
847
/// ```
842
848
#[ must_use]
843
849
#[ unstable( feature = "is_ascii_octdigit" , issue = "101288" ) ]
850
+ #[ allow( clippy:: manual_is_ascii_check) ] // exempt by being the one true definition
844
851
#[ inline]
845
852
pub const fn is_ascii_octdigit ( & self ) -> bool {
846
853
matches ! ( * self , b'0' ..=b'7' )
@@ -878,9 +885,10 @@ impl u8 {
878
885
#[ must_use]
879
886
#[ stable( feature = "ascii_ctype_on_intrinsics" , since = "1.24.0" ) ]
880
887
#[ rustc_const_stable( feature = "const_ascii_ctype_on_intrinsics" , since = "1.47.0" ) ]
888
+ #[ allow( clippy:: manual_is_ascii_check) ] // exempt by being the one true definition
881
889
#[ inline]
882
890
pub const fn is_ascii_hexdigit ( & self ) -> bool {
883
- matches ! ( * self , b'0' ..=b'9' ) | matches ! ( * self , b'A' ..=b'F' ) | matches ! ( * self , b'a' ..=b'f' )
891
+ matches ! ( * self , b'0' ..=b'9' | b'A' ..=b'F' | b'a' ..=b'f' )
884
892
}
885
893
886
894
/// Checks if the value is an ASCII punctuation character:
0 commit comments