@@ -503,6 +503,7 @@ impl u8 {
503
503
/// # Safety
504
504
///
505
505
/// This byte must be valid ASCII, or else this is UB.
506
+ #[ cfg_attr( flux, flux:: spec( fn ( { & Self [ @n] | n <= 127 } ) -> _) ) ]
506
507
#[ must_use]
507
508
#[ unstable( feature = "ascii_char" , issue = "110998" ) ]
508
509
#[ inline]
@@ -533,6 +534,7 @@ impl u8 {
533
534
/// ```
534
535
///
535
536
/// [`make_ascii_uppercase`]: Self::make_ascii_uppercase
537
+ #[ cfg_attr( flux, flux:: spec( fn ( & u8 [ @n] ) -> u8 [ to_ascii_uppercase( n) ] ) ) ]
536
538
#[ must_use = "to uppercase the value in-place, use `make_ascii_uppercase()`" ]
537
539
#[ stable( feature = "ascii_methods_on_intrinsics" , since = "1.23.0" ) ]
538
540
#[ rustc_const_stable( feature = "const_ascii_methods_on_intrinsics" , since = "1.52.0" ) ]
@@ -558,6 +560,7 @@ impl u8 {
558
560
/// ```
559
561
///
560
562
/// [`make_ascii_lowercase`]: Self::make_ascii_lowercase
563
+ #[ cfg_attr( flux, flux:: spec( fn ( & u8 [ @n] ) -> u8 [ to_ascii_lowercase( n) ] ) ) ]
561
564
#[ must_use = "to lowercase the value in-place, use `make_ascii_lowercase()`" ]
562
565
#[ stable( feature = "ascii_methods_on_intrinsics" , since = "1.23.0" ) ]
563
566
#[ rustc_const_stable( feature = "const_ascii_methods_on_intrinsics" , since = "1.52.0" ) ]
@@ -706,6 +709,7 @@ impl u8 {
706
709
/// assert!(!lf.is_ascii_uppercase());
707
710
/// assert!(!esc.is_ascii_uppercase());
708
711
/// ```
712
+ #[ cfg_attr( flux, flux:: spec( fn ( & Self [ @n] ) -> bool [ is_ascii_uppercase( n) ] ) ) ]
709
713
#[ must_use]
710
714
#[ stable( feature = "ascii_ctype_on_intrinsics" , since = "1.24.0" ) ]
711
715
#[ rustc_const_stable( feature = "const_ascii_ctype_on_intrinsics" , since = "1.47.0" ) ]
@@ -740,6 +744,7 @@ impl u8 {
740
744
/// assert!(!lf.is_ascii_lowercase());
741
745
/// assert!(!esc.is_ascii_lowercase());
742
746
/// ```
747
+ #[ cfg_attr( flux, flux:: spec( fn ( & u8 [ @n] ) -> bool [ is_ascii_lowercase( n) ] ) ) ]
743
748
#[ must_use]
744
749
#[ stable( feature = "ascii_ctype_on_intrinsics" , since = "1.24.0" ) ]
745
750
#[ rustc_const_stable( feature = "const_ascii_ctype_on_intrinsics" , since = "1.47.0" ) ]
0 commit comments