@@ -585,7 +585,9 @@ impl u8 {
585585 #[ rustc_const_stable( feature = "const_ascii_methods_on_intrinsics" , since = "1.52.0" ) ]
586586 #[ inline]
587587 pub const fn eq_ignore_ascii_case ( & self , other : & u8 ) -> bool {
588- self . to_ascii_lowercase ( ) == other. to_ascii_lowercase ( )
588+ #[ allow( clippy:: manual_ignore_case_cmp) ] // exempt by being the one true definition
589+ self . to_ascii_lowercase ( )
590+ == other. to_ascii_lowercase ( )
589591 }
590592
591593 /// Converts this value to its ASCII upper case equivalent in-place.
@@ -673,6 +675,7 @@ impl u8 {
673675 #[ rustc_const_stable( feature = "const_ascii_ctype_on_intrinsics" , since = "1.47.0" ) ]
674676 #[ inline]
675677 pub const fn is_ascii_alphabetic ( & self ) -> bool {
678+ #![ allow( clippy:: manual_is_ascii_check) ] // exempt by being the one true definition
676679 matches ! ( * self , b'A' ..=b'Z' | b'a' ..=b'z' )
677680 }
678681
@@ -707,6 +710,7 @@ impl u8 {
707710 #[ rustc_const_stable( feature = "const_ascii_ctype_on_intrinsics" , since = "1.47.0" ) ]
708711 #[ inline]
709712 pub const fn is_ascii_uppercase ( & self ) -> bool {
713+ #![ allow( clippy:: manual_is_ascii_check) ] // exempt by being the one true definition
710714 matches ! ( * self , b'A' ..=b'Z' )
711715 }
712716
@@ -741,6 +745,7 @@ impl u8 {
741745 #[ rustc_const_stable( feature = "const_ascii_ctype_on_intrinsics" , since = "1.47.0" ) ]
742746 #[ inline]
743747 pub const fn is_ascii_lowercase ( & self ) -> bool {
748+ #![ allow( clippy:: manual_is_ascii_check) ] // exempt by being the one true definition
744749 matches ! ( * self , b'a' ..=b'z' )
745750 }
746751
@@ -778,6 +783,7 @@ impl u8 {
778783 #[ rustc_const_stable( feature = "const_ascii_ctype_on_intrinsics" , since = "1.47.0" ) ]
779784 #[ inline]
780785 pub const fn is_ascii_alphanumeric ( & self ) -> bool {
786+ #![ allow( clippy:: manual_is_ascii_check) ] // exempt by being the one true definition
781787 matches ! ( * self , b'0' ..=b'9' ) | matches ! ( * self , b'A' ..=b'Z' ) | matches ! ( * self , b'a' ..=b'z' )
782788 }
783789
@@ -812,6 +818,7 @@ impl u8 {
812818 #[ rustc_const_stable( feature = "const_ascii_ctype_on_intrinsics" , since = "1.47.0" ) ]
813819 #[ inline]
814820 pub const fn is_ascii_digit ( & self ) -> bool {
821+ #![ allow( clippy:: manual_is_ascii_check) ] // exempt by being the one true definition
815822 matches ! ( * self , b'0' ..=b'9' )
816823 }
817824
@@ -843,6 +850,7 @@ impl u8 {
843850 #[ unstable( feature = "is_ascii_octdigit" , issue = "101288" ) ]
844851 #[ inline]
845852 pub const fn is_ascii_octdigit ( & self ) -> bool {
853+ #![ allow( clippy:: manual_is_ascii_check) ] // exempt by being the one true definition
846854 matches ! ( * self , b'0' ..=b'7' )
847855 }
848856
@@ -880,6 +888,7 @@ impl u8 {
880888 #[ rustc_const_stable( feature = "const_ascii_ctype_on_intrinsics" , since = "1.47.0" ) ]
881889 #[ inline]
882890 pub const fn is_ascii_hexdigit ( & self ) -> bool {
891+ #![ allow( clippy:: manual_is_ascii_check) ] // exempt by being the one true definition
883892 matches ! ( * self , b'0' ..=b'9' ) | matches ! ( * self , b'A' ..=b'F' ) | matches ! ( * self , b'a' ..=b'f' )
884893 }
885894
0 commit comments