@@ -503,6 +503,7 @@ impl u8 {
503503 /// # Safety
504504 ///
505505 /// This byte must be valid ASCII, or else this is UB.
506+ #[ cfg_attr( flux, flux:: spec( fn ( { & Self [ @n] | n <= 127 } ) -> _) ) ]
506507 #[ must_use]
507508 #[ unstable( feature = "ascii_char" , issue = "110998" ) ]
508509 #[ inline]
@@ -533,6 +534,7 @@ impl u8 {
533534 /// ```
534535 ///
535536 /// [`make_ascii_uppercase`]: Self::make_ascii_uppercase
537+ #[ cfg_attr( flux, flux:: spec( fn ( & u8 [ @n] ) -> u8 [ to_ascii_uppercase( n) ] ) ) ]
536538 #[ must_use = "to uppercase the value in-place, use `make_ascii_uppercase()`" ]
537539 #[ stable( feature = "ascii_methods_on_intrinsics" , since = "1.23.0" ) ]
538540 #[ rustc_const_stable( feature = "const_ascii_methods_on_intrinsics" , since = "1.52.0" ) ]
@@ -558,6 +560,7 @@ impl u8 {
558560 /// ```
559561 ///
560562 /// [`make_ascii_lowercase`]: Self::make_ascii_lowercase
563+ #[ cfg_attr( flux, flux:: spec( fn ( & u8 [ @n] ) -> u8 [ to_ascii_lowercase( n) ] ) ) ]
561564 #[ must_use = "to lowercase the value in-place, use `make_ascii_lowercase()`" ]
562565 #[ stable( feature = "ascii_methods_on_intrinsics" , since = "1.23.0" ) ]
563566 #[ rustc_const_stable( feature = "const_ascii_methods_on_intrinsics" , since = "1.52.0" ) ]
@@ -706,6 +709,7 @@ impl u8 {
706709 /// assert!(!lf.is_ascii_uppercase());
707710 /// assert!(!esc.is_ascii_uppercase());
708711 /// ```
712+ #[ cfg_attr( flux, flux:: spec( fn ( & Self [ @n] ) -> bool [ is_ascii_uppercase( n) ] ) ) ]
709713 #[ must_use]
710714 #[ stable( feature = "ascii_ctype_on_intrinsics" , since = "1.24.0" ) ]
711715 #[ rustc_const_stable( feature = "const_ascii_ctype_on_intrinsics" , since = "1.47.0" ) ]
@@ -740,6 +744,7 @@ impl u8 {
740744 /// assert!(!lf.is_ascii_lowercase());
741745 /// assert!(!esc.is_ascii_lowercase());
742746 /// ```
747+ #[ cfg_attr( flux, flux:: spec( fn ( & u8 [ @n] ) -> bool [ is_ascii_lowercase( n) ] ) ) ]
743748 #[ must_use]
744749 #[ stable( feature = "ascii_ctype_on_intrinsics" , since = "1.24.0" ) ]
745750 #[ rustc_const_stable( feature = "const_ascii_ctype_on_intrinsics" , since = "1.47.0" ) ]
0 commit comments