Skip to content

Commit

Permalink
Mark 'make_ascii_uppercase' and 'make_ascii_lowercase' in 'u8' as con…
Browse files Browse the repository at this point in the history
…st; Rename 'const_char_make_ascii' feature gate to 'const_make_ascii';
  • Loading branch information
bjoernager committed Sep 22, 2024
1 parent be9b3b4 commit 2daf076
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions library/core/src/char/methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1277,7 +1277,7 @@ impl char {
///
/// [`to_ascii_uppercase()`]: #method.to_ascii_uppercase
#[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]
pub const fn make_ascii_uppercase(&mut self) {
*self = self.to_ascii_uppercase();
Expand All @@ -1303,7 +1303,7 @@ impl char {
///
/// [`to_ascii_lowercase()`]: #method.to_ascii_lowercase
#[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]
pub const fn make_ascii_lowercase(&mut self) {
*self = self.to_ascii_lowercase();
Expand Down
6 changes: 4 additions & 2 deletions library/core/src/num/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -614,8 +614,9 @@ impl u8 {
///
/// [`to_ascii_uppercase`]: Self::to_ascii_uppercase
#[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")]
#[rustc_const_unstable(feature = "const_make_ascii", issue = "130698")]
#[inline]
pub fn make_ascii_uppercase(&mut self) {
pub const fn make_ascii_uppercase(&mut self) {
*self = self.to_ascii_uppercase();
}

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

Expand Down

0 comments on commit 2daf076

Please sign in to comment.