Skip to content

Commit

Permalink
Mark 'make_ascii_uppercase' and 'make_ascii_lowercase' in 'char' as c…
Browse files Browse the repository at this point in the history
…onst;
  • Loading branch information
bjoernager committed Sep 22, 2024
1 parent 82d17a4 commit e21f68f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions library/core/src/char/methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1277,8 +1277,9 @@ 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 = "none")]
#[inline]
pub fn make_ascii_uppercase(&mut self) {
pub const fn make_ascii_uppercase(&mut self) {
*self = self.to_ascii_uppercase();
}

Expand All @@ -1302,8 +1303,9 @@ 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 = "none")]
#[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 e21f68f

Please sign in to comment.