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 37eb770 commit 36b115f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions 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 = "130698")]
#[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 = "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 36b115f

Please sign in to comment.