Mark 'make_ascii_uppercase' and 'make_ascii_lowercase' in 'u8' as const; Rename 'const_char_make_ascii' feature gate to 'const_make_ascii';

This commit is contained in:
Gabriel Bjørnager Jensen 2024-09-22 19:54:35 +02:00
parent be9b3b459a
commit 2daf076fd8
2 changed files with 6 additions and 4 deletions

View File

@ -1277,7 +1277,7 @@ impl char {
/// ///
/// [`to_ascii_uppercase()`]: #method.to_ascii_uppercase /// [`to_ascii_uppercase()`]: #method.to_ascii_uppercase
#[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")] #[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")]
#[rustc_const_unstable(feature = "const_char_make_ascii", issue = "130698")] #[rustc_const_unstable(feature = "const_make_ascii", issue = "130698")]
#[inline] #[inline]
pub const fn make_ascii_uppercase(&mut self) { pub const fn make_ascii_uppercase(&mut self) {
*self = self.to_ascii_uppercase(); *self = self.to_ascii_uppercase();
@ -1303,7 +1303,7 @@ impl char {
/// ///
/// [`to_ascii_lowercase()`]: #method.to_ascii_lowercase /// [`to_ascii_lowercase()`]: #method.to_ascii_lowercase
#[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")] #[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")]
#[rustc_const_unstable(feature = "const_char_make_ascii", issue = "130698")] #[rustc_const_unstable(feature = "const_make_ascii", issue = "130698")]
#[inline] #[inline]
pub const fn make_ascii_lowercase(&mut self) { pub const fn make_ascii_lowercase(&mut self) {
*self = self.to_ascii_lowercase(); *self = self.to_ascii_lowercase();

View File

@ -614,8 +614,9 @@ impl u8 {
/// ///
/// [`to_ascii_uppercase`]: Self::to_ascii_uppercase /// [`to_ascii_uppercase`]: Self::to_ascii_uppercase
#[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")] #[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")]
#[rustc_const_unstable(feature = "const_make_ascii", issue = "130698")]
#[inline] #[inline]
pub fn make_ascii_uppercase(&mut self) { pub const fn make_ascii_uppercase(&mut self) {
*self = self.to_ascii_uppercase(); *self = self.to_ascii_uppercase();
} }
@ -639,8 +640,9 @@ impl u8 {
/// ///
/// [`to_ascii_lowercase`]: Self::to_ascii_lowercase /// [`to_ascii_lowercase`]: Self::to_ascii_lowercase
#[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")] #[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")]
#[rustc_const_unstable(feature = "const_make_ascii", issue = "130698")]
#[inline] #[inline]
pub fn make_ascii_lowercase(&mut self) { pub const fn make_ascii_lowercase(&mut self) {
*self = self.to_ascii_lowercase(); *self = self.to_ascii_lowercase();
} }