@@ -4448,8 +4448,9 @@ impl u8 {
44484448 /// assert!(!esc.is_ascii_alphabetic());
44494449 /// ```
44504450 #[ stable( feature = "ascii_ctype_on_intrinsics" , since = "1.24.0" ) ]
4451+ #[ rustc_const_unstable( feature = "const_ascii_ctype_on_intrinsics" , issue = "68983" ) ]
44514452 #[ inline]
4452- pub fn is_ascii_alphabetic ( & self ) -> bool {
4453+ pub const fn is_ascii_alphabetic ( & self ) -> bool {
44534454 matches ! ( * self , b'A' ..=b'Z' | b'a' ..=b'z' )
44544455 }
44554456
@@ -4480,8 +4481,9 @@ impl u8 {
44804481 /// assert!(!esc.is_ascii_uppercase());
44814482 /// ```
44824483 #[ stable( feature = "ascii_ctype_on_intrinsics" , since = "1.24.0" ) ]
4484+ #[ rustc_const_unstable( feature = "const_ascii_ctype_on_intrinsics" , issue = "68983" ) ]
44834485 #[ inline]
4484- pub fn is_ascii_uppercase ( & self ) -> bool {
4486+ pub const fn is_ascii_uppercase ( & self ) -> bool {
44854487 matches ! ( * self , b'A' ..=b'Z' )
44864488 }
44874489
@@ -4512,8 +4514,9 @@ impl u8 {
45124514 /// assert!(!esc.is_ascii_lowercase());
45134515 /// ```
45144516 #[ stable( feature = "ascii_ctype_on_intrinsics" , since = "1.24.0" ) ]
4517+ #[ rustc_const_unstable( feature = "const_ascii_ctype_on_intrinsics" , issue = "68983" ) ]
45154518 #[ inline]
4516- pub fn is_ascii_lowercase ( & self ) -> bool {
4519+ pub const fn is_ascii_lowercase ( & self ) -> bool {
45174520 matches ! ( * self , b'a' ..=b'z' )
45184521 }
45194522
@@ -4547,8 +4550,9 @@ impl u8 {
45474550 /// assert!(!esc.is_ascii_alphanumeric());
45484551 /// ```
45494552 #[ stable( feature = "ascii_ctype_on_intrinsics" , since = "1.24.0" ) ]
4553+ #[ rustc_const_unstable( feature = "const_ascii_ctype_on_intrinsics" , issue = "68983" ) ]
45504554 #[ inline]
4551- pub fn is_ascii_alphanumeric ( & self ) -> bool {
4555+ pub const fn is_ascii_alphanumeric ( & self ) -> bool {
45524556 matches ! ( * self , b'0' ..=b'9' | b'A' ..=b'Z' | b'a' ..=b'z' )
45534557 }
45544558
@@ -4579,8 +4583,9 @@ impl u8 {
45794583 /// assert!(!esc.is_ascii_digit());
45804584 /// ```
45814585 #[ stable( feature = "ascii_ctype_on_intrinsics" , since = "1.24.0" ) ]
4586+ #[ rustc_const_unstable( feature = "const_ascii_ctype_on_intrinsics" , issue = "68983" ) ]
45824587 #[ inline]
4583- pub fn is_ascii_digit ( & self ) -> bool {
4588+ pub const fn is_ascii_digit ( & self ) -> bool {
45844589 matches ! ( * self , b'0' ..=b'9' )
45854590 }
45864591
@@ -4614,8 +4619,9 @@ impl u8 {
46144619 /// assert!(!esc.is_ascii_hexdigit());
46154620 /// ```
46164621 #[ stable( feature = "ascii_ctype_on_intrinsics" , since = "1.24.0" ) ]
4622+ #[ rustc_const_unstable( feature = "const_ascii_ctype_on_intrinsics" , issue = "68983" ) ]
46174623 #[ inline]
4618- pub fn is_ascii_hexdigit ( & self ) -> bool {
4624+ pub const fn is_ascii_hexdigit ( & self ) -> bool {
46194625 matches ! ( * self , b'0' ..=b'9' | b'A' ..=b'F' | b'a' ..=b'f' )
46204626 }
46214627
@@ -4650,8 +4656,9 @@ impl u8 {
46504656 /// assert!(!esc.is_ascii_punctuation());
46514657 /// ```
46524658 #[ stable( feature = "ascii_ctype_on_intrinsics" , since = "1.24.0" ) ]
4659+ #[ rustc_const_unstable( feature = "const_ascii_ctype_on_intrinsics" , issue = "68983" ) ]
46534660 #[ inline]
4654- pub fn is_ascii_punctuation ( & self ) -> bool {
4661+ pub const fn is_ascii_punctuation ( & self ) -> bool {
46554662 matches ! ( * self , b'!' ..=b'/' | b':' ..=b'@' | b'[' ..=b'`' | b'{' ..=b'~' )
46564663 }
46574664
@@ -4682,8 +4689,9 @@ impl u8 {
46824689 /// assert!(!esc.is_ascii_graphic());
46834690 /// ```
46844691 #[ stable( feature = "ascii_ctype_on_intrinsics" , since = "1.24.0" ) ]
4692+ #[ rustc_const_unstable( feature = "const_ascii_ctype_on_intrinsics" , issue = "68983" ) ]
46854693 #[ inline]
4686- pub fn is_ascii_graphic ( & self ) -> bool {
4694+ pub const fn is_ascii_graphic ( & self ) -> bool {
46874695 matches ! ( * self , b'!' ..=b'~' )
46884696 }
46894697
@@ -4731,8 +4739,9 @@ impl u8 {
47314739 /// assert!(!esc.is_ascii_whitespace());
47324740 /// ```
47334741 #[ stable( feature = "ascii_ctype_on_intrinsics" , since = "1.24.0" ) ]
4742+ #[ rustc_const_unstable( feature = "const_ascii_ctype_on_intrinsics" , issue = "68983" ) ]
47344743 #[ inline]
4735- pub fn is_ascii_whitespace ( & self ) -> bool {
4744+ pub const fn is_ascii_whitespace ( & self ) -> bool {
47364745 matches ! ( * self , b'\t' | b'\n' | b'\x0C' | b'\r' | b' ' )
47374746 }
47384747
@@ -4765,8 +4774,9 @@ impl u8 {
47654774 /// assert!(esc.is_ascii_control());
47664775 /// ```
47674776 #[ stable( feature = "ascii_ctype_on_intrinsics" , since = "1.24.0" ) ]
4777+ #[ rustc_const_unstable( feature = "const_ascii_ctype_on_intrinsics" , issue = "68983" ) ]
47684778 #[ inline]
4769- pub fn is_ascii_control ( & self ) -> bool {
4779+ pub const fn is_ascii_control ( & self ) -> bool {
47704780 matches ! ( * self , b'\0' ..=b'\x1F' | b'\x7F' )
47714781 }
47724782}
0 commit comments