Auto merge of #130697 - bjoernager:const-char-make-ascii, r=dtolnay · qinheping/verify-rust-std@9c26e05 (original) (raw)

Original file line number Diff line number Diff line change
@@ -1279,8 +1279,9 @@ impl char {
1279 1279 ///
1280 1280 /// [`to_ascii_uppercase()`]: #method.to_ascii_uppercase
1281 1281 #[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")]
1282 +#[rustc_const_unstable(feature = "const_char_make_ascii", issue = "130698")]
1282 1283 #[inline]
1283 -pub fn make_ascii_uppercase(&mut self) {
1284 +pub const fn make_ascii_uppercase(&mut self) {
1284 1285 *self = self.to_ascii_uppercase();
1285 1286 }
1286 1287
@@ -1304,8 +1305,9 @@ impl char {
1304 1305 ///
1305 1306 /// [`to_ascii_lowercase()`]: #method.to_ascii_lowercase
1306 1307 #[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")]
1308 +#[rustc_const_unstable(feature = "const_char_make_ascii", issue = "130698")]
1307 1309 #[inline]
1308 -pub fn make_ascii_lowercase(&mut self) {
1310 +pub const fn make_ascii_lowercase(&mut self) {
1309 1311 *self = self.to_ascii_lowercase();
1310 1312 }
1311 1313