@@ -4448,8 +4448,9 @@ impl u8 {
4448
4448
/// assert!(!esc.is_ascii_alphabetic());
4449
4449
/// ```
4450
4450
#[ stable( feature = "ascii_ctype_on_intrinsics" , since = "1.24.0" ) ]
4451
+ #[ rustc_const_unstable( feature = "const_ascii_ctype_on_intrinsics" , issue = "68983" ) ]
4451
4452
#[ inline]
4452
- pub fn is_ascii_alphabetic ( & self ) -> bool {
4453
+ pub const fn is_ascii_alphabetic ( & self ) -> bool {
4453
4454
matches ! ( * self , b'A' ..=b'Z' | b'a' ..=b'z' )
4454
4455
}
4455
4456
@@ -4480,8 +4481,9 @@ impl u8 {
4480
4481
/// assert!(!esc.is_ascii_uppercase());
4481
4482
/// ```
4482
4483
#[ stable( feature = "ascii_ctype_on_intrinsics" , since = "1.24.0" ) ]
4484
+ #[ rustc_const_unstable( feature = "const_ascii_ctype_on_intrinsics" , issue = "68983" ) ]
4483
4485
#[ inline]
4484
- pub fn is_ascii_uppercase ( & self ) -> bool {
4486
+ pub const fn is_ascii_uppercase ( & self ) -> bool {
4485
4487
matches ! ( * self , b'A' ..=b'Z' )
4486
4488
}
4487
4489
@@ -4512,8 +4514,9 @@ impl u8 {
4512
4514
/// assert!(!esc.is_ascii_lowercase());
4513
4515
/// ```
4514
4516
#[ stable( feature = "ascii_ctype_on_intrinsics" , since = "1.24.0" ) ]
4517
+ #[ rustc_const_unstable( feature = "const_ascii_ctype_on_intrinsics" , issue = "68983" ) ]
4515
4518
#[ inline]
4516
- pub fn is_ascii_lowercase ( & self ) -> bool {
4519
+ pub const fn is_ascii_lowercase ( & self ) -> bool {
4517
4520
matches ! ( * self , b'a' ..=b'z' )
4518
4521
}
4519
4522
@@ -4547,8 +4550,9 @@ impl u8 {
4547
4550
/// assert!(!esc.is_ascii_alphanumeric());
4548
4551
/// ```
4549
4552
#[ stable( feature = "ascii_ctype_on_intrinsics" , since = "1.24.0" ) ]
4553
+ #[ rustc_const_unstable( feature = "const_ascii_ctype_on_intrinsics" , issue = "68983" ) ]
4550
4554
#[ inline]
4551
- pub fn is_ascii_alphanumeric ( & self ) -> bool {
4555
+ pub const fn is_ascii_alphanumeric ( & self ) -> bool {
4552
4556
matches ! ( * self , b'0' ..=b'9' | b'A' ..=b'Z' | b'a' ..=b'z' )
4553
4557
}
4554
4558
@@ -4579,8 +4583,9 @@ impl u8 {
4579
4583
/// assert!(!esc.is_ascii_digit());
4580
4584
/// ```
4581
4585
#[ stable( feature = "ascii_ctype_on_intrinsics" , since = "1.24.0" ) ]
4586
+ #[ rustc_const_unstable( feature = "const_ascii_ctype_on_intrinsics" , issue = "68983" ) ]
4582
4587
#[ inline]
4583
- pub fn is_ascii_digit ( & self ) -> bool {
4588
+ pub const fn is_ascii_digit ( & self ) -> bool {
4584
4589
matches ! ( * self , b'0' ..=b'9' )
4585
4590
}
4586
4591
@@ -4614,8 +4619,9 @@ impl u8 {
4614
4619
/// assert!(!esc.is_ascii_hexdigit());
4615
4620
/// ```
4616
4621
#[ stable( feature = "ascii_ctype_on_intrinsics" , since = "1.24.0" ) ]
4622
+ #[ rustc_const_unstable( feature = "const_ascii_ctype_on_intrinsics" , issue = "68983" ) ]
4617
4623
#[ inline]
4618
- pub fn is_ascii_hexdigit ( & self ) -> bool {
4624
+ pub const fn is_ascii_hexdigit ( & self ) -> bool {
4619
4625
matches ! ( * self , b'0' ..=b'9' | b'A' ..=b'F' | b'a' ..=b'f' )
4620
4626
}
4621
4627
@@ -4650,8 +4656,9 @@ impl u8 {
4650
4656
/// assert!(!esc.is_ascii_punctuation());
4651
4657
/// ```
4652
4658
#[ stable( feature = "ascii_ctype_on_intrinsics" , since = "1.24.0" ) ]
4659
+ #[ rustc_const_unstable( feature = "const_ascii_ctype_on_intrinsics" , issue = "68983" ) ]
4653
4660
#[ inline]
4654
- pub fn is_ascii_punctuation ( & self ) -> bool {
4661
+ pub const fn is_ascii_punctuation ( & self ) -> bool {
4655
4662
matches ! ( * self , b'!' ..=b'/' | b':' ..=b'@' | b'[' ..=b'`' | b'{' ..=b'~' )
4656
4663
}
4657
4664
@@ -4682,8 +4689,9 @@ impl u8 {
4682
4689
/// assert!(!esc.is_ascii_graphic());
4683
4690
/// ```
4684
4691
#[ stable( feature = "ascii_ctype_on_intrinsics" , since = "1.24.0" ) ]
4692
+ #[ rustc_const_unstable( feature = "const_ascii_ctype_on_intrinsics" , issue = "68983" ) ]
4685
4693
#[ inline]
4686
- pub fn is_ascii_graphic ( & self ) -> bool {
4694
+ pub const fn is_ascii_graphic ( & self ) -> bool {
4687
4695
matches ! ( * self , b'!' ..=b'~' )
4688
4696
}
4689
4697
@@ -4731,8 +4739,9 @@ impl u8 {
4731
4739
/// assert!(!esc.is_ascii_whitespace());
4732
4740
/// ```
4733
4741
#[ stable( feature = "ascii_ctype_on_intrinsics" , since = "1.24.0" ) ]
4742
+ #[ rustc_const_unstable( feature = "const_ascii_ctype_on_intrinsics" , issue = "68983" ) ]
4734
4743
#[ inline]
4735
- pub fn is_ascii_whitespace ( & self ) -> bool {
4744
+ pub const fn is_ascii_whitespace ( & self ) -> bool {
4736
4745
matches ! ( * self , b'\t' | b'\n' | b'\x0C' | b'\r' | b' ' )
4737
4746
}
4738
4747
@@ -4765,8 +4774,9 @@ impl u8 {
4765
4774
/// assert!(esc.is_ascii_control());
4766
4775
/// ```
4767
4776
#[ stable( feature = "ascii_ctype_on_intrinsics" , since = "1.24.0" ) ]
4777
+ #[ rustc_const_unstable( feature = "const_ascii_ctype_on_intrinsics" , issue = "68983" ) ]
4768
4778
#[ inline]
4769
- pub fn is_ascii_control ( & self ) -> bool {
4779
+ pub const fn is_ascii_control ( & self ) -> bool {
4770
4780
matches ! ( * self , b'\0' ..=b'\x1F' | b'\x7F' )
4771
4781
}
4772
4782
}
0 commit comments