Skip to content

Commit 36b115f

Browse files
committed
Mark 'make_ascii_uppercase' and 'make_ascii_lowercase' in 'char' as const;
1 parent 37eb770 commit 36b115f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

core/src/char/methods.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -1277,8 +1277,9 @@ impl char {
12771277
///
12781278
/// [`to_ascii_uppercase()`]: #method.to_ascii_uppercase
12791279
#[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")]
1280+
#[rustc_const_unstable(feature = "const_char_make_ascii", issue = "130698")]
12801281
#[inline]
1281-
pub fn make_ascii_uppercase(&mut self) {
1282+
pub const fn make_ascii_uppercase(&mut self) {
12821283
*self = self.to_ascii_uppercase();
12831284
}
12841285

@@ -1302,8 +1303,9 @@ impl char {
13021303
///
13031304
/// [`to_ascii_lowercase()`]: #method.to_ascii_lowercase
13041305
#[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")]
1306+
#[rustc_const_unstable(feature = "const_char_make_ascii", issue = "130698")]
13051307
#[inline]
1306-
pub fn make_ascii_lowercase(&mut self) {
1308+
pub const fn make_ascii_lowercase(&mut self) {
13071309
*self = self.to_ascii_lowercase();
13081310
}
13091311

0 commit comments

Comments
 (0)